/// <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; }
public DatagramPacketEncoder(MessageToMessageEncoder <T> encoder) { Contract.Requires(encoder != null); this.encoder = encoder; }