コード例 #1
0
        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);
            }
        }
コード例 #2
0
 public static List <RpcResponse <T> > DeserializeBulk <T>(this IRequestSerializer jsonSerializer, string json)
 {
     return(jsonSerializer.DeserializeBulk(json, id => typeof(T))
            .Cast <RpcResponse <T> >()
            .ToList());
 }