/// <summary> /// The callback will be returned to the user, who needs to invoke it in concrete /// service implementation. Call should be made directly from same thread as /// service method is executed. /// </summary> /// <param name="sessionId">Handler session id</param> /// <returns></returns> public static Action <JsonResponse> GetAsyncProcessCallback(string sessionId = "") { Handler handler; if ("" == sessionId) { handler = Handler.GetSessionHandler(Handler.DefaultSessionId()); } else { handler = Handler.GetSessionHandler(sessionId); } return(handler.GetAsyncCallback()); }
public static void BindService <T>() where T : new() { BindService <T>(Handler.DefaultSessionId()); }
protected JsonRpcService() { buildService(Handler.DefaultSessionId()); }
protected JsonRpcService() { ServiceBinder.BindService(Handler.DefaultSessionId(), this); }
internal static void ProcessJsonRpcState(JsonRpcStateAsync async, object jsonRpcContext = null) { ProcessJsonRpcState(Handler.DefaultSessionId(), async, jsonRpcContext); }
public static Task <string> Process(string jsonRpc, object context = null) { return(Process(Handler.DefaultSessionId(), jsonRpc, context)); }
public void Dispose() { Handler.DestroySession(Handler.DefaultSessionId()); }
public static void Process(JsonRpcStateAsync async, object context = null) { Process(Handler.DefaultSessionId(), async, context); }
public static Task <string> Process(JsonRequest request, object context = null) { return(Process(Handler.DefaultSessionId(), request, context)); }
public static void AsyncProcess(string jsonRpc, Action <string> callback, object context = null) { Task.Factory.StartNew(() => AsyncProcessInternal(Handler.DefaultSessionId(), jsonRpc, context, callback)); }
public static async Task <JsonResponse[]> Process(string jsonRpc, JsonRequest[] jsonRequests, object context = null) { return(await Process(Handler.DefaultSessionId(), jsonRpc, jsonRequests, context)); }
public static Task <string> Process(string jsonRpc, object context = null, JsonSerializerSettings settings = null) { return(Process(Handler.DefaultSessionId(), jsonRpc, context, settings)); }
public static void Process(JsonRpcStateAsync async, object context = null, JsonSerializerSettings settings = null) { Process(Handler.DefaultSessionId(), async, context, settings); }