Exemplo n.º 1
0
 public Dispatcher(QueueAddressGenerator addressGenerator, AzureStorageAddressingSettings addressing, MessageWrapperSerializer serializer, Func <UnicastTransportOperation, CancellationToken, Task <bool> > shouldSend)
 {
     createQueueClients    = new CreateQueueClients();
     this.addressGenerator = addressGenerator;
     this.addressing       = addressing;
     this.serializer       = serializer;
     this.shouldSend       = shouldSend;
 }
Exemplo n.º 2
0
 public Dispatcher(QueueAddressGenerator addressGenerator, AzureStorageAddressingSettings addressing, MessageWrapperSerializer serializer, NativeDelayDeliveryPersistence nativeDelayDeliveryPersistence, ISubscriptionStore subscriptionStore)
 {
     this.subscriptionStore = subscriptionStore;
     this.addressGenerator = addressGenerator;
     this.addressing = addressing;
     this.serializer = serializer;
     this.nativeDelayDeliveryPersistence = nativeDelayDeliveryPersistence;
 }
Exemplo n.º 3
0
 public DefaultMessageEnvelopeUnwrapper(MessageWrapperSerializer messageSerializer)
 {
     messageWrapperSerializer = messageSerializer;
 }
Exemplo n.º 4
0
        static MessageWrapperSerializer BuildSerializer(ReadOnlySettings settings)
        {
            if (settings.TryGet <SerializationDefinition>(WellKnownConfigurationKeys.MessageWrapperSerializationDefinition, out var wrapperSerializer))
            {
                return(new MessageWrapperSerializer(wrapperSerializer.Configure(settings)(MessageWrapperSerializer.GetMapper())));
            }

            return(new MessageWrapperSerializer(AzureStorageQueueTransport.GetMainSerializer(MessageWrapperSerializer.GetMapper(), settings)));
        }
Exemplo n.º 5
0
        internal static MessageWrapperSerializer BuildWrapperSerializer(ReadOnlySettings settings)
        {
            if (settings.TryGet <SerializationDefinition>(WellKnownConfigurationKeys.MessageWrapperSerializationDefinition, out var wrapperSerializer))
            {
                return(new MessageWrapperSerializer(wrapperSerializer.Configure(settings)(MessageWrapperSerializer.GetMapper())));
            }

            var messageMapper = settings.Get <IMessageMapper>();

            //var serializerDefinition = endpointConfiguration.GetSettings().GetMainSerializer();

            if (!settings.TryGet(AzureStorageQueueTransport.SerializerSettingsKey, out Tuple <SerializationDefinition, SettingsHolder> defaultSerializerAndSettings))
            {
                defaultSerializerAndSettings = Tuple.Create <SerializationDefinition, SettingsHolder>(new XmlSerializer(), new SettingsHolder());
            }

            var serializer = defaultSerializerAndSettings.Item1.Configure(settings)(messageMapper);

            return(new MessageWrapperSerializer(serializer));
        }