Esempio n. 1
0
        /// <summary>
        ///     c'tor taking settings to configure the endpoint with
        /// </summary>
        public TransportFactoryImpl(ReceiverSettings receiverSettings, SenderSettings senderSettings)
        {
            _addresses = new ReaderWriterLockedDictionary <Uri, AzureServiceBusEndpointAddress>();
            _connCache = new ReaderWriterLockedDictionary <Uri, ConnectionHandler <ConnectionImpl> >();
            _formatter = new AzureMessageNameFormatter();

            _receiverSettings = receiverSettings;
            _senderSettings   = senderSettings;

            _logger.Debug("created new transport factory");
        }
        /// <summary>
        /// 	c'tor taking settings to configure the endpoint with
        /// </summary>
        public TransportFactoryImpl(ReceiverSettings receiverSettings, SenderSettings senderSettings)
        {
            _addresses = new ReaderWriterLockedDictionary<Uri, IAzureServiceBusEndpointAddress>();
            _connCache = new ReaderWriterLockedDictionary<Uri, ConnectionHandler<AzureServiceBusConnection>>();
            _formatter = new AzureServiceBusMessageNameFormatter();

            _receiverSettings = receiverSettings;
            _senderSettings = senderSettings;

            _logger.Debug("created new transport factory");
        }
Esempio n. 3
0
		public EndpointFactory(IObjectBuilder objectBuilder,
		                       Type defaultSerializer,
		                       IEnumerable<Type> transportTypes,
		                       IEnumerable<KeyValuePair<Uri, Action<IEndpointConfigurator>>> endpointConfigurators)
		{
			_transportConfigurators = new ReaderWriterLockedDictionary<Type, Func<Uri, Action<IEndpointConfigurator>, IEndpoint>>();
			_endpointConfigurators = new ReaderWriterLockedDictionary<Uri, Action<IEndpointConfigurator>>(endpointConfigurators);
			_endpoints = new ReaderWriterLockedDictionary<Uri, IEndpoint>();

			_defaultSerializer = defaultSerializer;
			_objectBuilder = objectBuilder;

			ConnectTransportConfigurators(transportTypes);
		}
Esempio n. 4
0
        public EndpointFactory(IObjectBuilder objectBuilder,
                               Type defaultSerializer,
                               IEnumerable <Type> transportTypes,
                               IEnumerable <KeyValuePair <Uri, Action <IEndpointConfigurator> > > endpointConfigurators)
        {
            _transportConfigurators = new ReaderWriterLockedDictionary <Type, Func <Uri, Action <IEndpointConfigurator>, IEndpoint> >();
            _endpointConfigurators  = new ReaderWriterLockedDictionary <Uri, Action <IEndpointConfigurator> >(endpointConfigurators);
            _endpoints = new ReaderWriterLockedDictionary <Uri, IEndpoint>();

            _defaultSerializer = defaultSerializer;
            _objectBuilder     = objectBuilder;

            ConnectTransportConfigurators(transportTypes);
        }
        static DotNotXmlMessageSerializer()
        {
            _serializers = new ReaderWriterLockedDictionary <Type, XmlSerializer>();

            _deserializers = new ReaderWriterLockedDictionary <Type, XmlSerializer>
            {
                { typeof(XmlReceiveMessageEnvelope), new XmlSerializer(typeof(XmlReceiveMessageEnvelope)) },
            };

            _namespaces = new XmlSerializerNamespaces();
            _namespaces.Add("", "");

            _attributes         = new XmlAttributes();
            _attributes.XmlRoot = new XmlRootAttribute("Message");
        }
        protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }
            if (disposing)
            {
                _endpointConfigurators.Dispose();
                _endpointConfigurators = null;

                _transportTypes.Dispose();
                _transportTypes = null;
            }
            _disposed = true;
        }
Esempio n. 7
0
        protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }
            if (disposing)
            {
                Clear();

                _endpoints.Dispose();
                _endpoints = null;

                _endpointFactory.Dispose();
            }

            _disposed = true;
        }
Esempio n. 8
0
        protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }
            if (disposing)
            {
                _endpointConfigurators.Dispose();
                _endpointConfigurators = null;

                _transportConfigurators.Dispose();
                _transportConfigurators = null;

                _endpoints.Values.Each(endpoint => endpoint.Dispose());

                _endpoints.Dispose();
                _endpoints = null;
            }
            _disposed = true;
        }
 public RabbitMqTransportFactory(IDictionary<Uri, ConnectionFactoryBuilder> connectionFactoryBuilders)
 {
     _connectionCache = new ReaderWriterLockedDictionary<Uri, ConnectionHandler<RabbitMqConnection>>();
     _connectionFactoryBuilders = connectionFactoryBuilders;
     _messageNameFormatter = new RabbitMqMessageNameFormatter();
 }
Esempio n. 10
0
        public EndpointCache(IEndpointFactory endpointFactory)
        {
            _endpointFactory = endpointFactory;

            _endpoints = new ReaderWriterLockedDictionary <Uri, IEndpoint>();
        }
Esempio n. 11
0
 public BatchSubscriber()
 {
     _instances  = new ReaderWriterLockedDictionary <Type, Func <BatchSubscriber, ISubscriberContext, object, UnsubscribeAction> >();
     _components = new ReaderWriterLockedDictionary <Type, Func <BatchSubscriber, ISubscriberContext, UnsubscribeAction> >();
 }
Esempio n. 12
0
        protected virtual void Dispose(bool disposing)
		{
			if (_disposed) return;
			if (disposing)
			{
				_endpointConfigurators.Dispose();
				_endpointConfigurators = null;

				_transportConfigurators.Dispose();
				_transportConfigurators = null;

				_endpoints.Values.Each(endpoint => endpoint.Dispose());

				_endpoints.Dispose();
				_endpoints = null;
			}
			_disposed = true;
		}
Esempio n. 13
0
 public RabbitMqTransportFactory()
 {
     _connectionCache           = new ReaderWriterLockedDictionary <Uri, ConnectionHandler <RabbitMqConnection> >();
     _connectionFactoryBuilders = new Dictionary <Uri, ConnectionFactoryBuilder>();
 }
		public BusSubscriptionCache(SubscriptionObserver observer)
		{
			_observer = observer;
			_subscriptions = new ReaderWriterLockedDictionary<string, BusSubscription>();
		}
 private EndpointFactoryConfigurator()
 {
     _transportTypes        = new ReaderWriterLockedObject <HashSet <Type> >(new HashSet <Type>());
     _endpointConfigurators = new ReaderWriterLockedDictionary <Uri, Action <IEndpointConfigurator> >();
 }
		public RabbitMqTransportFactory()
		{
			_connectionCache = new ReaderWriterLockedDictionary<Uri, ConnectionHandler<RabbitMqConnection>>();
			_connectionFactoryBuilders = new Dictionary<Uri, ConnectionFactoryBuilder>();
		}
 public RabbitMqTransportFactory(IDictionary <Uri, ConnectionFactoryBuilder> connectionFactoryBuilders)
 {
     _connectionCache           = new ReaderWriterLockedDictionary <Uri, ConnectionHandler <RabbitMqConnection> >();
     _connectionFactoryBuilders = connectionFactoryBuilders;
     _messageNameFormatter      = new RabbitMqMessageNameFormatter();
 }
Esempio n. 18
0
		protected virtual void Dispose(bool disposing)
		{
			if (_disposed) return;
			if (disposing)
			{
				Clear();

				_endpoints.Dispose();
				_endpoints = null;

				_endpointFactory.Dispose();
			}

			_disposed = true;
		}
Esempio n. 19
0
 static StateMachineUserType()
 {
     _getStateMethods = new ReaderWriterLockedDictionary<Type, Func<string, State>>();
 }
		public RabbitMqTransportFactory()
		{
			_connectionCache = new ReaderWriterLockedDictionary<Uri, IConnection>();
		}
 protected ConsumesSubscriberBase()
 {
     _components = new ReaderWriterLockedDictionary <Type, Func <TInterceptor, ISubscriberContext, UnsubscribeAction> >();
     _instances  = new ReaderWriterLockedDictionary <Type, Func <TInterceptor, ISubscriberContext, object, UnsubscribeAction> >();
 }
Esempio n. 22
0
 public ConsumesForSubscriber()
 {
     _instances = new ReaderWriterLockedDictionary <Type, Func <ConsumesForSubscriber, ISubscriberContext, object, UnsubscribeAction> >();
 }
Esempio n. 23
0
		public EndpointCache(IEndpointFactory endpointFactory)
		{
			_endpointFactory = endpointFactory;

			_endpoints = new ReaderWriterLockedDictionary<Uri, IEndpoint>();
		}
 /// <summary>
 ///   Initializes a new instance of the <see cref="StompTransportFactory" /> class.
 /// </summary>
 public StompTransportFactory()
 {
     _connectionCache = new ReaderWriterLockedDictionary <Uri, ConnectionHandler <StompConnection> >();
 }
Esempio n. 25
0
 static StateMachineUserType()
 {
     _getStateMethods = new ReaderWriterLockedDictionary <Type, Func <string, State> >();
 }
 /// <summary>
 ///   Initializes a new instance of the <see cref="StompTransportFactory" /> class.
 /// </summary>
 public StompTransportFactory()
 {
     _connectionCache = new ReaderWriterLockedDictionary<Uri, ConnectionHandler<StompConnection>>();
 }