@@ -72,28 +72,12 @@ public Startup(IWebHostEnvironment webHostEnvironment)
7272
7373 internal static EventStoreClientSettings EventStoreClientSettings ;
7474
75- internal static void ConfigureEventStoreSettings ( EventStoreClientSettings settings = null )
75+ internal static void ConfigureEventStoreSettings ( EventStoreClientSettings settings )
7676 {
77- if ( settings == null )
78- {
79- settings = new EventStoreClientSettings ( ) ;
80- }
81-
82- settings . CreateHttpMessageHandler = ( ) => new SocketsHttpHandler
83- {
84- SslOptions =
85- {
86- RemoteCertificateValidationCallback = ( sender ,
87- certificate ,
88- chain ,
89- errors ) => true ,
90- }
91- } ;
92- settings . ConnectionName = Startup . Configuration . GetValue < String > ( "EventStoreSettings:ConnectionName" ) ;
9377 settings . ConnectivitySettings = EventStoreClientConnectivitySettings . Default ;
9478 settings . ConnectivitySettings . Address = new Uri ( Startup . Configuration . GetValue < String > ( "EventStoreSettings:ConnectionString" ) ) ;
9579 settings . ConnectivitySettings . Insecure = Startup . Configuration . GetValue < Boolean > ( "EventStoreSettings:Insecure" ) ;
96-
80+
9781 settings . DefaultCredentials = new UserCredentials ( Startup . Configuration . GetValue < String > ( "EventStoreSettings:UserName" ) ,
9882 Startup . Configuration . GetValue < String > ( "EventStoreSettings:Password" ) ) ;
9983 Startup . EventStoreClientSettings = settings ;
@@ -105,12 +89,10 @@ public void ConfigureContainer(ServiceRegistry services)
10589 {
10690 ConfigurationReader . Initialise ( Startup . Configuration ) ;
10791
108- Startup . ConfigureEventStoreSettings ( ) ;
109-
110- services . IncludeRegistry < MiddlewareRegistry > ( ) ;
11192 services . IncludeRegistry < MediatorRegistry > ( ) ;
11293 services . IncludeRegistry < RepositoryRegistry > ( ) ;
113-
94+ services . IncludeRegistry < MiddlewareRegistry > ( ) ;
95+
11496 // TODO: Create one domain event from each assembly here
11597 TypeProvider . LoadDomainEventsTypeDynamically ( ) ;
11698
0 commit comments