public RawConsumeContext(JsonSerializer deserializer, ReceiveContext receiveContext, JToken messageToken, RawSerializerOptions options) : base(receiveContext) { _messageToken = messageToken ?? new JObject(); _deserializer = deserializer; _options = options; _messageTypes = new Dictionary <Type, ConsumeContext>(); _headerAdapter = new RawMessageHeaderAdapter(receiveContext, options); _supportedTypes = _headerAdapter.SupportedMessageTypes; }
public RawXmlMessageSerializer(RawSerializerOptions options = RawSerializerOptions.Default) { _options = options; }
public RawJsonMessageSerializer(RawJsonSerializerOptions options = RawJsonSerializerOptions.Default) { _options = (RawSerializerOptions)options; }
public RawXmlMessageDeserializer(JsonSerializer deserializer, RawSerializerOptions options = RawSerializerOptions.Default) { _deserializer = deserializer; _options = options; }
/// <summary> /// Serialize messages using the raw XML message serializer /// </summary> /// <param name="configurator"></param> /// <param name="options">If false, only supported messages types (read from the message headers) will be returned</param> public static void UseRawXmlSerializer(this IReceiveEndpointConfigurator configurator, RawSerializerOptions options) { configurator.SetMessageSerializer(() => new RawXmlMessageSerializer(options)); configurator.AddMessageDeserializer(RawXmlMessageSerializer.RawXmlContentType, () => new RawXmlMessageDeserializer(JsonMessageSerializer.Deserializer, options)); }
public RawMessageHeaderAdapter(ReceiveContext receiveContext, RawSerializerOptions options) { _receiveContext = receiveContext; _options = options; _headers = receiveContext.TransportHeaders; }