Beispiel #1
0
        public AdaptedContainerBuilderOptions(ContainerBuilderOptions <TTenant> parentOptions, Func <ITenantContainerAdaptor> adaptorFactory)
        {
            ContainerBuilderOptions     = parentOptions;
            HostContainerAdaptorFactory = adaptorFactory;

            ContainerBuilderOptions.Builder.ServiceProviderFactory = new Func <IServiceProvider>(() =>
            {
                return(HostContainerAdaptorFactory());
            });
        }
        public AdaptedContainerBuilderOptions(ContainerBuilderOptions <TTenant> parentOptions, Func <ITenantContainerAdaptor> adaptorFactory)
        {
            ContainerBuilderOptions     = parentOptions;
            HostContainerAdaptorFactory = adaptorFactory;

            ContainerBuilderOptions.Builder.ServiceProviderFactory = new Func <IServiceProvider>(() =>
            {
                var builtContainer = HostContainerAdaptorFactory();

                OnHostContainerBuilt?.Invoke(builtContainer);

                return(builtContainer);
            });
        }
 public TenantContainerEventsOptions(ContainerBuilderOptions <TTenant> parentOptions)
 {
     ParentOptions = parentOptions;
     TenantContainerCreatedCallbacks       = new List <Action <Task <TTenant>, IServiceProvider> >();
     NestedTenantContainerCreatedCallbacks = new List <Action <Task <TTenant>, IServiceProvider> >();
 }