Exemplo n.º 1
0
        /// <summary>
        /// Create an encoder that encodes the content in <see cref="IAddressedEnvelope{T}"/> to <see cref="DatagramPacket"/> using
        /// the specified message encoder.
        /// </summary>
        /// <param name="encoder">the specified message encoder</param>
        public DatagramPacketEncoder(MessageToMessageEncoder <T> encoder)
        {
            if (encoder is null)
            {
                CThrowHelper.ThrowArgumentNullException(CExceptionArgument.encoder);
            }

            this.encoder = encoder;
        }
Exemplo n.º 2
0
        public DatagramPacketEncoder(MessageToMessageEncoder <T> encoder)
        {
            Contract.Requires(encoder != null);

            this.encoder = encoder;
        }