/// <summary>
        /// Applies this configuration to the specified <paramref name="transport"/>.
        /// </summary>
        /// <param name="transport">The transport to be configured.</param>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown when <paramref name="transport"/> is <see langword="null"/>.
        /// </exception>
        public virtual void Apply(DnsTransport transport)
        {
            Guard.NotNull(transport, "transport");

            transport.ReceiveTimeout = this.ReceiveTimeout;
            transport.SendTimeout    = this.SendTimeout;
        }
        /// <summary>
        /// Applies this configuration to the specified <paramref name="transport"/>.
        /// </summary>
        /// <param name="transport">The transport to be configured.</param>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown when <paramref name="transport"/> is <see langword="null"/>.
        /// </exception>
        public override void Apply(DnsTransport transport)
        {
            DnsSmartTransport smart = (DnsSmartTransport)transport;

            base.Apply(transport);
            smart.UdpTransport = this.UdpTransportInstance;
            smart.TcpTransport = this.TcpTransportInstance;
        }
Beispiel #3
0
 /// <summary>
 /// Applies this configuration to the specified <paramref name="transport"/>.
 /// </summary>
 /// <param name="transport">The transport to be configured.</param>
 /// <exception cref="System.ArgumentNullException">
 /// Thrown when <paramref name="transport"/> is <see langword="null"/>.
 /// </exception>
 public override void Apply(DnsTransport transport)
 {
     base.Apply(transport);
     ((DnsUdpTransport)transport).TransmitRetries = this.TransmitRetries;
 }
Beispiel #4
0
 /// <summary>
 /// Applies this configuration to the specified <paramref name="transport"/>.
 /// </summary>
 /// <param name="transport">The transport to be configured.</param>
 /// <exception cref="System.ArgumentNullException">
 /// Thrown when <paramref name="transport"/> is <see langword="null"/>.
 /// </exception>
 public override void Apply(DnsTransport transport)
 {
     base.Apply(transport);
     ((DnsTcpTransport)transport).MaxIncomingMessageSize = this.MaxIncomingMessageSize;
 }