示例#1
0
        public byte[] SerializeToBytes(Abstractions.Websocket.GraphQLWebSocketRequest request)
        {
            var json = JsonConvert.SerializeObject(new GraphQLWebSocketRequest(request), JsonSerializerSettings);

            return(Encoding.UTF8.GetBytes(json));
        }
示例#2
0
 public GraphQLWebSocketRequest(Abstractions.Websocket.GraphQLWebSocketRequest other)
 {
     Id      = other.Id;
     Type    = other.Type;
     Payload = other.Payload != null ? new GraphQLRequest(other.Payload) : null;             // create serializer-specific type
 }
示例#3
0
 public byte[] SerializeToBytes(Abstractions.Websocket.GraphQLWebSocketRequest request)
 {
     return(JsonSerializer.SerializeToUtf8Bytes(new GraphQLWebSocketRequest(request), Options));
 }