コード例 #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");
        }
コード例 #2
0
        /// <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");
        }
コード例 #3
0
ファイル: EndpointFactory.cs プロジェクト: KevM/MassTransit
		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);
		}
コード例 #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);
        }
コード例 #5
0
        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");
        }
コード例 #6
0
        protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }
            if (disposing)
            {
                _endpointConfigurators.Dispose();
                _endpointConfigurators = null;

                _transportTypes.Dispose();
                _transportTypes = null;
            }
            _disposed = true;
        }
コード例 #7
0
        protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }
            if (disposing)
            {
                Clear();

                _endpoints.Dispose();
                _endpoints = null;

                _endpointFactory.Dispose();
            }

            _disposed = true;
        }
コード例 #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;
        }
コード例 #9
0
 public RabbitMqTransportFactory(IDictionary<Uri, ConnectionFactoryBuilder> connectionFactoryBuilders)
 {
     _connectionCache = new ReaderWriterLockedDictionary<Uri, ConnectionHandler<RabbitMqConnection>>();
     _connectionFactoryBuilders = connectionFactoryBuilders;
     _messageNameFormatter = new RabbitMqMessageNameFormatter();
 }
コード例 #10
0
        public EndpointCache(IEndpointFactory endpointFactory)
        {
            _endpointFactory = endpointFactory;

            _endpoints = new ReaderWriterLockedDictionary <Uri, IEndpoint>();
        }
コード例 #11
0
 public BatchSubscriber()
 {
     _instances  = new ReaderWriterLockedDictionary <Type, Func <BatchSubscriber, ISubscriberContext, object, UnsubscribeAction> >();
     _components = new ReaderWriterLockedDictionary <Type, Func <BatchSubscriber, ISubscriberContext, UnsubscribeAction> >();
 }
コード例 #12
0
ファイル: EndpointFactory.cs プロジェクト: KevM/MassTransit
        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;
		}
コード例 #13
0
 public RabbitMqTransportFactory()
 {
     _connectionCache           = new ReaderWriterLockedDictionary <Uri, ConnectionHandler <RabbitMqConnection> >();
     _connectionFactoryBuilders = new Dictionary <Uri, ConnectionFactoryBuilder>();
 }
コード例 #14
0
		public BusSubscriptionCache(SubscriptionObserver observer)
		{
			_observer = observer;
			_subscriptions = new ReaderWriterLockedDictionary<string, BusSubscription>();
		}
コード例 #15
0
 private EndpointFactoryConfigurator()
 {
     _transportTypes        = new ReaderWriterLockedObject <HashSet <Type> >(new HashSet <Type>());
     _endpointConfigurators = new ReaderWriterLockedDictionary <Uri, Action <IEndpointConfigurator> >();
 }
コード例 #16
0
		public RabbitMqTransportFactory()
		{
			_connectionCache = new ReaderWriterLockedDictionary<Uri, ConnectionHandler<RabbitMqConnection>>();
			_connectionFactoryBuilders = new Dictionary<Uri, ConnectionFactoryBuilder>();
		}
コード例 #17
0
 public RabbitMqTransportFactory(IDictionary <Uri, ConnectionFactoryBuilder> connectionFactoryBuilders)
 {
     _connectionCache           = new ReaderWriterLockedDictionary <Uri, ConnectionHandler <RabbitMqConnection> >();
     _connectionFactoryBuilders = connectionFactoryBuilders;
     _messageNameFormatter      = new RabbitMqMessageNameFormatter();
 }
コード例 #18
0
ファイル: EndpointCache.cs プロジェクト: codeyu/MassTransit
		protected virtual void Dispose(bool disposing)
		{
			if (_disposed) return;
			if (disposing)
			{
				Clear();

				_endpoints.Dispose();
				_endpoints = null;

				_endpointFactory.Dispose();
			}

			_disposed = true;
		}
コード例 #19
0
ファイル: StateMachineUserType.cs プロジェクト: KevM/Magnum
 static StateMachineUserType()
 {
     _getStateMethods = new ReaderWriterLockedDictionary<Type, Func<string, State>>();
 }
コード例 #20
0
		public RabbitMqTransportFactory()
		{
			_connectionCache = new ReaderWriterLockedDictionary<Uri, IConnection>();
		}
コード例 #21
0
 protected ConsumesSubscriberBase()
 {
     _components = new ReaderWriterLockedDictionary <Type, Func <TInterceptor, ISubscriberContext, UnsubscribeAction> >();
     _instances  = new ReaderWriterLockedDictionary <Type, Func <TInterceptor, ISubscriberContext, object, UnsubscribeAction> >();
 }
コード例 #22
0
 public ConsumesForSubscriber()
 {
     _instances = new ReaderWriterLockedDictionary <Type, Func <ConsumesForSubscriber, ISubscriberContext, object, UnsubscribeAction> >();
 }
コード例 #23
0
ファイル: EndpointCache.cs プロジェクト: codeyu/MassTransit
		public EndpointCache(IEndpointFactory endpointFactory)
		{
			_endpointFactory = endpointFactory;

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