public static List <RpcResponse> DeserializeBulk(this IRequestSerializer jsonSerializer, string json, IDictionary <RpcId, Type> resultTypeMap) { return(jsonSerializer.DeserializeBulk(json, GetType)); Type GetType(RpcId id) { resultTypeMap.TryGetValue(id, out Type value); return(value); } }
public static List <RpcResponse <T> > DeserializeBulk <T>(this IRequestSerializer jsonSerializer, string json) { return(jsonSerializer.DeserializeBulk(json, id => typeof(T)) .Cast <RpcResponse <T> >() .ToList()); }