/// <summary>
        /// Initializes a new instance of the <see cref="TcpProtocolChannelTemplate"/> class.
        /// </summary>
        /// <param name="tcpConfiguration">The configuration for the WCF tcp channel.</param>
        /// <param name="dataContractResolver">The <see cref="DataContractResolver"/> that is used for the endpoints.</param>
        /// <exception cref="ArgumentNullException">
        ///     Thrown if <paramref name="tcpConfiguration"/> is <see langword="null" />.
        /// </exception>
        /// <exception cref="ArgumentNullException">
        ///     Thrown if <paramref name="dataContractResolver"/> is <see langword="null" />.
        /// </exception>
        public TcpProtocolChannelTemplate(IConfiguration tcpConfiguration, ProtocolDataContractResolver dataContractResolver)
            : base(tcpConfiguration)
        {
            {
                Lokad.Enforce.Argument(() => dataContractResolver);
            }

            m_DataContractResolver = dataContractResolver;
        }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NamedPipeProtocolChannelTemplate"/> class.
        /// </summary>
        /// <param name="namedPipeConfiguration">The configuration for the WCF named pipe channel.</param>
        /// <param name="dataContractResolver">The <see cref="DataContractResolver"/> that is used for the endpoints.</param>
        /// <exception cref="ArgumentNullException">
        ///     Thrown if <paramref name="namedPipeConfiguration"/> is <see langword="null" />.
        /// </exception>
        /// <exception cref="ArgumentNullException">
        ///     Thrown if <paramref name="dataContractResolver"/> is <see langword="null" />.
        /// </exception>
        public NamedPipeProtocolChannelTemplate(IConfiguration namedPipeConfiguration, ProtocolDataContractResolver dataContractResolver)
            : base(namedPipeConfiguration)
        {
            {
                Lokad.Enforce.Argument(() => dataContractResolver);
            }

            m_DataContractResolver = dataContractResolver;
        }