Class RequestFactory
- Namespace
- Coherence.Cloud
- Assembly
- Coherence.Runtime.dll
public class RequestFactory : IRequestFactory
- Inheritance
-
RequestFactory
- Implements
-
Constructors
RequestFactory(IRuntimeSettings, bool)
public RequestFactory(IRuntimeSettings runtimeSettings, bool useWebSocket = true)
Parameters
runtimeSettings
IRuntimeSettings
useWebSocket
bool
Properties
IsReady
public bool IsReady { get; }
Property Value
- bool
Methods
AddPushCallback(string, Action<string>)
public void AddPushCallback(string requestPath, Action<string> onPushCallback)
Parameters
requestPath
string
onPushCallback
Action<string>
DisconnectWebSocket()
public void DisconnectWebSocket()
Dispose()
ForceCreateWebSocket()
public void ForceCreateWebSocket()
GetRequestCooldown(string, string)
public TimeSpan GetRequestCooldown(string request, string method)
Parameters
request
string
method
string
Returns
- TimeSpan
RemovePushCallback(string, Action<string>)
public void RemovePushCallback(string requestPath, Action<string> onPushCallback)
Parameters
requestPath
string
onPushCallback
Action<string>
SendCustomRequest(string, string, string, string, Action<RequestResponse<string>>)
public void SendCustomRequest(string endpoint, string path, string method, string body, Action<RequestResponse<string>> callback)
Parameters
endpoint
string
path
string
method
string
body
string
callback
Action<RequestResponse<string>>
SendCustomRequestAsync(string, string, string, string)
public Task<string> SendCustomRequestAsync(string endpoint, string path, string method, string body)
Parameters
endpoint
string
path
string
method
string
body
string
Returns
- Task<string>
SendRequest(string, string, string, Dictionary<string, string>, string, string, Action<RequestResponse<string>>)
public void SendRequest(string basePath, string method, string body, Dictionary<string, string> headers, string requestName, string sessionToken, Action<RequestResponse<string>> callback)
Parameters
basePath
string
method
string
body
string
headers
Dictionary<string, string>
requestName
string
sessionToken
string
callback
Action<RequestResponse<string>>
SendRequest(string, string, string, string, Dictionary<string, string>, string, string, Action<RequestResponse<string>>)
public void SendRequest(string basePath, string pathParams, string method, string body, Dictionary<string, string> headers, string requestName, string sessionToken, Action<RequestResponse<string>> callback)
Parameters
basePath
string
pathParams
string
method
string
body
string
headers
Dictionary<string, string>
requestName
string
sessionToken
string
callback
Action<RequestResponse<string>>
SendRequestAsync(string, string, string, Dictionary<string, string>, string, string)
public Task<string> SendRequestAsync(string basePath, string method, string body, Dictionary<string, string> headers, string requestName, string sessionToken)
Parameters
basePath
string
method
string
body
string
headers
Dictionary<string, string>
requestName
string
sessionToken
string
Returns
- Task<string>
SendRequestAsync(string, string, string, string, Dictionary<string, string>, string, string)
public Task<string> SendRequestAsync(string basePath, string pathParams, string method, string body, Dictionary<string, string> headers, string requestName, string sessionToken)
Parameters
basePath
string
pathParams
string
method
string
body
string
headers
Dictionary<string, string>
requestName
string
sessionToken
string
Returns
- Task<string>
SetRequestThrottling(TimeSpan)
public void SetRequestThrottling(TimeSpan requestInterval)
Parameters
requestInterval
TimeSpan
Events
OnWebSocketConnect
public event Action OnWebSocketConnect
Event Type
- Action
OnWebSocketConnectionError
public event Action OnWebSocketConnectionError
Event Type
- Action
OnWebSocketDisconnect
public event Action OnWebSocketDisconnect
Event Type
- Action