Esempio n. 1
0
        protected EventStoreClientFixtureBase(EventStoreClientSettings?clientSettings,
                                              IDictionary <string, string>?env = null)
        {
            _disposables = new List <IDisposable>();
            ServicePointManager.ServerCertificateValidationCallback = delegate { return(true); };
            Settings = clientSettings ?? new EventStoreClientSettings {
                CreateHttpMessageHandler = () => new SocketsHttpHandler {
                    SslOptions =
                    {
                        RemoteCertificateValidationCallback = delegate { return(true); }
                    }
                },
                OperationOptions =
                {
                    TimeoutAfter = Debugger.IsAttached
                                                ? new TimeSpan?()
                                                : TimeSpan.FromSeconds(30)
                },
                ConnectivitySettings =
                {
                    Address    = new UriBuilder {
                        Scheme = Uri.UriSchemeHttps,
                        Port   = 2113
                    }.Uri
                },
                LoggerFactory = new SerilogLoggerFactory()
            };

            TestServer = new EventStoreTestServer(Settings.ConnectivitySettings.Address, env);
        }
        protected EventStoreClientFixtureBase(EventStoreClientSettings?clientSettings,
                                              IDictionary <string, string>?env = null)
        {
            _disposables = new List <IDisposable>();

            Settings = clientSettings ?? new EventStoreClientSettings {
                OperationOptions =
                {
                    TimeoutAfter = Debugger.IsAttached
                                                ? new TimeSpan?()
                                                : TimeSpan.FromSeconds(30)
                },
                CreateHttpMessageHandler = () => new SocketsHttpHandler {
                    SslOptions = new SslClientAuthenticationOptions {
                        RemoteCertificateValidationCallback = delegate { return(true); }
                    }
                }
            };

            TestServer = new EventStoreTestServer(env);
        }
        protected EventStoreClientFixtureBase(EventStoreClientSettings?clientSettings,
                                              IDictionary <string, string>?env = null)
        {
            _disposables = new List <IDisposable>();

            Settings = clientSettings ?? new EventStoreClientSettings {
                OperationOptions =
                {
                    TimeoutAfter = Debugger.IsAttached
                                                ? new TimeSpan?()
                                                : TimeSpan.FromSeconds(30)
                },
                ConnectivitySettings =
                {
                    Address    = new UriBuilder {
                        Scheme = Uri.UriSchemeHttp,
                        Port   = 2113
                    }.Uri
                },
                LoggerFactory = new SerilogLoggerFactory()
            };

            TestServer = new EventStoreTestServer(Settings.ConnectivitySettings.Address, env);
        }