Example #1
0
        /// <summary>
        /// Creates the specified queue name.
        /// </summary>
        /// <param name="uri">The URI.</param>
        /// <param name="rabbitWrapperType">Type of the rabbit wrapper.</param>
        /// <returns></returns>
        public static IRabbitWrapper Create(Uri uri, RabbitWrapperType rabbitWrapperType)
        {
            var rabbitConnectionProvider = new RabbitConnectionProvider(uri)
            {
                Logger = LoggerManager.Instance
            };

            return(new RabbitWrapper(rabbitConnectionProvider, rabbitWrapperType)
            {
                Logger = LoggerManager.Instance
            });
        }
Example #2
0
        /// <summary>
        /// Creates the specified queue name.
        /// </summary>
        /// <param name="uri">The URI.</param>
        /// <param name="rabbitWrapperType">Type of the rabbit wrapper.</param>
        /// <returns></returns>
        public static IRabbitWrapper Create(Uri uri, RabbitWrapperType rabbitWrapperType)
        {
            var rabbitConnectionProvider = new RabbitConnectionProvider(uri) { Logger = LoggerManager.Instance };

            return new RabbitWrapper(rabbitConnectionProvider, rabbitWrapperType) { Logger = LoggerManager.Instance };
        }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RabbitWrapper"/> class.
 /// </summary>
 /// <param name="connectionProvider">The connection provider.</param>
 /// <param name="rabbitWrapperType">Type of the rabbit wrapper.</param>
 internal RabbitWrapper(IConnectionProvider <IRabbitConnection> connectionProvider, RabbitWrapperType rabbitWrapperType)
 {
     _connectionProvider = connectionProvider;
     _rabbitWrapperType  = rabbitWrapperType;
     _connection         = _connectionProvider.Connect();
 }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RabbitWrapper"/> class.
 /// </summary>
 /// <param name="connectionProvider">The connection provider.</param>
 /// <param name="rabbitWrapperType">Type of the rabbit wrapper.</param>
 internal RabbitWrapper(IConnectionProvider<IRabbitConnection> connectionProvider, RabbitWrapperType rabbitWrapperType)
 {
     _connectionProvider = connectionProvider;
     _rabbitWrapperType = rabbitWrapperType;
     _connection = _connectionProvider.Connect();
 }