Stashbox by Peter Csajtai

<PackageReference Include="Stashbox" Version="5.16.0" />

 TenantDistributor

Represents a tenant distributor that manages tenants in a multi-tenant environment.

public TenantDistributor(IStashboxContainer rootContainer = null)

Constructs a TenantDistributor.

public object Activate(Type type, ResolutionBehavior resolutionBehavior, object[] arguments)

public IDependencyResolver BeginScope(object name = null, bool attachToParent = false)

public TTo BuildUp<TTo>(TTo instance, ResolutionBehavior resolutionBehavior = 3)

public bool CanResolve(Type typeFrom, object name = null, ResolutionBehavior resolutionBehavior = 3)

public IStashboxContainer ComposeBy(Type compositionRootType, object[] compositionRootArguments)

public void ConfigureTenant(object tenantId, Action<IStashboxContainer> tenantConfig, bool attachTenantToRoot = true)

public IStashboxContainer CreateChildContainer(Action<ContainerConfigurator> config = null, bool attachToParent = true)

public IStashboxContainer CreateChildContainer(object identifier, Action<IStashboxContainer> config = null, bool attachToParent = true)

public void Dispose()

public IStashboxContainer GetChildContainer(object identifier)

public object GetService(Type serviceType)

public IDependencyResolver GetTenant(object tenantId)

public bool IsRegistered<TFrom>(object name = null)

public bool IsRegistered(Type typeFrom, object name = null)

public void PutInstanceInScope(Type typeFrom, object instance, bool withoutDisposalTracking = false, object name = null)

public IStashboxContainer Register<TFrom, TTo>(Action<RegistrationConfigurator<TFrom, TTo>> configurator) where TTo : TFrom

public IStashboxContainer Register<TFrom, TTo>(object name = null) where TTo : TFrom

public IStashboxContainer Register<TFrom>(Type typeTo, Action<RegistrationConfigurator<TFrom, TFrom>> configurator = null)

public IStashboxContainer Register(Type typeFrom, Type typeTo, Action<RegistrationConfigurator> configurator = null)

public IStashboxContainer Register<TTo>(Action<RegistrationConfigurator<TTo, TTo>> configurator)

public IStashboxContainer Register<TTo>(object name = null)

public IStashboxContainer Register(Type typeTo, Action<RegistrationConfigurator> configurator = null)

public IStashboxContainer RegisterDecorator(Type typeFrom, Type typeTo, Action<DecoratorConfigurator> configurator = null)

public IStashboxContainer RegisterDecorator<TFrom, TTo>(Action<DecoratorConfigurator<TFrom, TTo>> configurator = null) where TTo : TFrom

public IStashboxContainer RegisterDecorator<TTo>(Action<DecoratorConfigurator<TTo, TTo>> configurator = null)

public IStashboxContainer RegisterDecorator<TFrom>(Type typeTo, Action<DecoratorConfigurator<TFrom, TFrom>> configurator = null)

public IStashboxContainer RegisterFunc<TService>(Func<IDependencyResolver, TService> factory, object name = null)

public IStashboxContainer RegisterFunc<T1, TService>(Func<T1, IDependencyResolver, TService> factory, object name = null)

public IStashboxContainer RegisterFunc<T1, T2, TService>(Func<T1, T2, IDependencyResolver, TService> factory, object name = null)

public IStashboxContainer RegisterFunc<T1, T2, T3, TService>(Func<T1, T2, T3, IDependencyResolver, TService> factory, object name = null)

public IStashboxContainer RegisterFunc<T1, T2, T3, T4, TService>(Func<T1, T2, T3, T4, IDependencyResolver, TService> factory, object name = null)

public IStashboxContainer RegisterInstance<TInstance>(TInstance instance, object name = null, bool withoutDisposalTracking = false, Action<TInstance> finalizerDelegate = null)

public IStashboxContainer RegisterInstance(object instance, Type serviceType, object name = null, bool withoutDisposalTracking = false)

public IStashboxContainer RegisterScoped<TFrom, TTo>(object name = null) where TTo : TFrom

public IStashboxContainer RegisterScoped(Type typeFrom, Type typeTo, object name = null)

public IStashboxContainer RegisterScoped<TTo>(object name = null)

public IStashboxContainer RegisterSingleton<TFrom, TTo>(object name = null) where TTo : TFrom

public IStashboxContainer RegisterSingleton<TTo>(object name = null)

public IStashboxContainer RegisterSingleton(Type typeFrom, Type typeTo, object name = null)

public IStashboxContainer RegisterTypes(IEnumerable<Type> types, Func<Type, bool> selector = null, Func<Type, Type, bool> serviceTypeSelector = null, bool registerSelf = true, Action<RegistrationConfigurator> configurator = null)

public IStashboxContainer RegisterTypesAs(Type typeFrom, IEnumerable<Type> types, Func<Type, bool> selector = null, Action<RegistrationConfigurator> configurator = null)

public IStashboxContainer ReMap<TFrom, TTo>(Action<RegistrationConfigurator<TFrom, TTo>> configurator = null) where TTo : TFrom

public IStashboxContainer ReMap<TFrom>(Type typeTo, Action<RegistrationConfigurator<TFrom, TFrom>> configurator = null)

public IStashboxContainer ReMap(Type typeFrom, Type typeTo, Action<RegistrationConfigurator> configurator = null)

public IStashboxContainer ReMap<TTo>(Action<RegistrationConfigurator<TTo, TTo>> configurator = null)

public IStashboxContainer ReMapDecorator(Type typeFrom, Type typeTo, Action<DecoratorConfigurator> configurator = null)

public IStashboxContainer ReMapDecorator<TFrom, TTo>(Action<DecoratorConfigurator<TFrom, TTo>> configurator = null) where TTo : TFrom

public IStashboxContainer ReMapDecorator<TFrom>(Type typeTo, Action<DecoratorConfigurator<TFrom, TFrom>> configurator = null)

public object Resolve(Type typeFrom)

public object Resolve(Type typeFrom, object name, object[] dependencyOverrides, ResolutionBehavior resolutionBehavior = 3)

public Delegate ResolveFactory(Type typeFrom, object name = null, ResolutionBehavior resolutionBehavior = 3, Type[] parameterTypes)

public Delegate ResolveFactoryOrDefault(Type typeFrom, object name = null, ResolutionBehavior resolutionBehavior = 3, Type[] parameterTypes)

public object ResolveOrDefault(Type typeFrom)

public object ResolveOrDefault(Type typeFrom, object name, object[] dependencyOverrides, ResolutionBehavior resolutionBehavior = 3)

public void Validate()

public IStashboxContainer WireUp<TInstance>(TInstance instance, object name = null, bool withoutDisposalTracking = false, Action<TInstance> finalizerDelegate = null)

public IStashboxContainer WireUp(object instance, Type serviceType, object name = null, bool withoutDisposalTracking = false)