public byte[] SerializeToBytes(Abstractions.Websocket.GraphQLWebSocketRequest request) { var json = JsonConvert.SerializeObject(new GraphQLWebSocketRequest(request), JsonSerializerSettings); return(Encoding.UTF8.GetBytes(json)); }
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 }
public byte[] SerializeToBytes(Abstractions.Websocket.GraphQLWebSocketRequest request) { return(JsonSerializer.SerializeToUtf8Bytes(new GraphQLWebSocketRequest(request), Options)); }