Beispiel #1
0
 public static ConfigurationFacility ConfigureConnectionStrings(this ConfigurationFacility facility, string bundleName, params string[] parameters)
 {
     facility.AddInitStep(kernel =>
     {
         kernel.Register(Component.For <ConnectionStringResolver>().DependsOnBundle(bundleName, "", parameters ?? new string[0]));
         var connectionStringResolver = kernel.Resolve <ConnectionStringResolver>();
         kernel.Resolver.AddSubResolver(connectionStringResolver);
     });
     return(facility);
 }
Beispiel #2
0
        public static ConfigurationFacility ConfigureTransports(this ConfigurationFacility facility, IDictionary <string, JailStrategy> jailStrategies, string bundleName, params string[] parameters)
        {
            facility.AddInitStep(kernel =>
            {
                var transportResolver = Component.For <ITransportResolver>()
                                        .ImplementedBy <TransportResolver>()
                                        .DependsOnBundle(bundleName, "", parameters)
                                        .DependsOn(new { jailStrategies = jailStrategies });

                kernel.Register(transportResolver, Component.For <EndpointResolver>().DependsOnBundle(bundleName, "", parameters ?? new string[0]));
                var endpointResolver = kernel.Resolve <EndpointResolver>();
                kernel.Resolver.AddSubResolver(endpointResolver);
            });
            return(facility);
        }
Beispiel #3
0
 public static ConfigurationFacility ConfigureTransports(this ConfigurationFacility facility, string bundleName, params string[] parameters)
 {
     return(ConfigureTransports(facility, null, bundleName, parameters));
 }