示例#1
0
        /// <summary>
        /// Instantiates.
        /// </summary>
        /// <param name="factory">the factory for creating <see cref="IProtocolEncoder"/> and <see cref="IProtocolDecoder"/></param>
        public ProtocolCodecFilter(IProtocolCodecFactory factory)
        {
            if (factory == null)
                throw new ArgumentNullException("factory");

            _factory = factory;
        }
示例#2
0
        /// <summary>
        /// Instantiates.
        /// </summary>
        /// <param name="factory">the factory for creating <see cref="IProtocolEncoder"/> and <see cref="IProtocolDecoder"/></param>
        public ProtocolCodecFilter(IProtocolCodecFactory factory)
        {
            if (factory == null)
            {
                throw new ArgumentNullException("factory");
            }

            _factory = factory;
        }
        public AmqpChannel(IByteChannel byteChannel, IProtocolDecoderOutput decoderOutput)
        {
            _byteChannel   = byteChannel;
            _decoderOutput = decoderOutput;
            _syncLock      = new object();

            AMQProtocolProvider   protocolProvider = new AMQProtocolProvider();
            IProtocolCodecFactory factory          = protocolProvider.CodecFactory;

            _encoder = factory.Encoder;
            _decoder = factory.Decoder;
        }