internal override (List <RpcResponse>, RpcBulkResponse) Deserialize(string responseJson, IRequestSerializer requestSerializer) { IDictionary <RpcId, Type> typeMap = this.request.GetTypeMap(); var responses = requestSerializer.Deserialize(responseJson, typeMap); return(responses, RpcBulkResponse.FromResponses(responses)); }
internal override (List <RpcResponse>, RpcResponse <TResponse>) Deserialize(string responseJson, IRequestSerializer requestSerializer) { var typeMap = new Dictionary <RpcId, Type> { [this.request.Id] = typeof(TResponse) }; var responses = requestSerializer.Deserialize(responseJson, typeMap); return(responses, RpcResponse <TResponse> .FromResponse(responses.Single())); }
public static RpcResponse <T> Deserialize <T>(this IRequestSerializer jsonSerializer, string json) { return((RpcResponse <T>)jsonSerializer.Deserialize(json, typeof(T))); }
private JobRequest CreateJobRequest(IMessage message) { return(_serializer.Deserialize(message.Body)); }