Exemplo n.º 1
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="BaseMessageProtocol" /> class.
        /// </summary>
        /// <param name="serializer">message encoder</param>
        /// <param name="typeEncoder">type information encoder</param>
        /// <param name="defaults">override for protocol defaults</param>
        protected BaseMessageProtocol(IBinarySerializaton serializer, ICSharpTypeEncoder typeEncoder, IProtocolDefaults defaults)
        {
            Arguments.NotNull(serializer, nameof(serializer));
            Arguments.NotNull(typeEncoder, nameof(typeEncoder));
            Arguments.NotNull(defaults, nameof(defaults));

            this.BinaryEncoder = serializer;
            this.TypeEncoder   = typeEncoder;
            this.Defaults      = defaults;
        }
Exemplo n.º 2
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="BaseMessageProtocol" /> class.
 /// </summary>
 /// <param name="serializer">message encoder</param>
 /// <param name="defaults">override for protocol defaults</param>
 protected BaseMessageProtocol(IBinarySerializaton serializer, IProtocolDefaults defaults)
     : this(serializer, new NoCSharpType(), defaults)
 {
     Arguments.NotNull(serializer, nameof(serializer));
     Arguments.NotNull(defaults, nameof(defaults));
 }