コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="IgniteClientConfiguration"/> class.
        /// </summary>
        /// <param name="cfg">The configuration to copy.</param>
        public IgniteClientConfiguration(IgniteClientConfiguration cfg) : this()
        {
            if (cfg == null)
            {
                return;
            }

#pragma warning disable 618
            Host = cfg.Host;
            Port = cfg.Port;
#pragma warning restore 618
            SocketSendBufferSize    = cfg.SocketSendBufferSize;
            SocketReceiveBufferSize = cfg.SocketReceiveBufferSize;
            TcpNoDelay    = cfg.TcpNoDelay;
            SocketTimeout = cfg.SocketTimeout;

            if (cfg.BinaryConfiguration != null)
            {
                BinaryConfiguration = new BinaryConfiguration(cfg.BinaryConfiguration);
            }

            BinaryProcessor  = cfg.BinaryProcessor;
            SslStreamFactory = cfg.SslStreamFactory;

            UserName                 = cfg.UserName;
            Password                 = cfg.Password;
            Endpoints                = cfg.Endpoints == null ? null : cfg.Endpoints.ToList();
            ReconnectDisabled        = cfg.ReconnectDisabled;
            EnablePartitionAwareness = cfg.EnablePartitionAwareness;
            Logger          = cfg.Logger;
            ProtocolVersion = cfg.ProtocolVersion;

            if (cfg.TransactionConfiguration != null)
            {
                TransactionConfiguration = new TransactionClientConfiguration(cfg.TransactionConfiguration);
            }

            RetryLimit        = cfg.RetryLimit;
            RetryPolicy       = cfg.RetryPolicy;
            EnableHeartbeats  = cfg.EnableHeartbeats;
            HeartbeatInterval = cfg.HeartbeatInterval;
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="IgniteClientConfiguration"/> class.
        /// </summary>
        /// <param name="cfg">The configuration to copy.</param>
        public IgniteClientConfiguration(IgniteClientConfiguration cfg) : this()
        {
            if (cfg == null)
            {
                return;
            }

            Host = cfg.Host;
            Port = cfg.Port;
            SocketSendBufferSize    = cfg.SocketSendBufferSize;
            SocketReceiveBufferSize = cfg.SocketReceiveBufferSize;
            TcpNoDelay    = cfg.TcpNoDelay;
            SocketTimeout = cfg.SocketTimeout;

            if (cfg.BinaryConfiguration != null)
            {
                BinaryConfiguration = new BinaryConfiguration(cfg.BinaryConfiguration);
            }

            BinaryProcessor = cfg.BinaryProcessor;
        }