C# Класс Revenj.Extensibility.Autofac.Core.Lifetime.LifetimeScope

Lifetime scope implementation.
Наследование: Disposable, ISharingLifetimeScope, IServiceProvider
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
RootTag object

Открытые методы

Метод Описание
BeginLifetimeScope ( ) : ILifetimeScope

Begin a new anonymous sub-scope. Instances created via the sub-scope will be disposed along with it.

BeginLifetimeScope ( Action configurationAction ) : ILifetimeScope

Begin a new anonymous sub-scope, with additional components available to it. Component instances created via the new scope will be disposed along with it.

BeginLifetimeScope ( object tag ) : ILifetimeScope

Begin a new tagged sub-scope. Instances created via the sub-scope will be disposed along with it.

BeginLifetimeScope ( object tag, Action configurationAction ) : ILifetimeScope

Begin a new tagged sub-scope, with additional components available to it. Component instances created via the new scope will be disposed along with it.

GetOrCreateAndShare ( System.Guid id, Func creator ) : object

Try to retrieve an instance based on a GUID key. If the instance does not exist, invoke creator to create it.

LifetimeScope ( IComponentRegistry componentRegistry ) : System

Create a root lifetime scope for the provided components.

LifetimeScope ( IComponentRegistry componentRegistry, object tag ) : System

Create a root lifetime scope for the provided components.

ResolveLookup ( Service service, IComponentRegistration registration, IEnumerable parameters ) : IInstanceLookup

Resolve an lookup of the provided registration within the context.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources

LifetimeScope ( IComponentRegistry componentRegistry, LifetimeScope parent, object tag ) : System

Create a lifetime scope for the provided components and nested beneath a parent.

Приватные методы

Метод Описание
CheckNotDisposed ( ) : void
CreateScopeRestrictedRegistry ( object tag, Action configurationAction ) : Revenj.Extensibility.Autofac.Core.Registration.ScopeRestrictedRegistry
IServiceProvider ( Type serviceType ) : object

Gets the service object of the specified type.

LifetimeScope ( ) : System
MakeAnonymousTag ( ) : object

Описание методов

BeginLifetimeScope() публичный Метод

Begin a new anonymous sub-scope. Instances created via the sub-scope will be disposed along with it.
public BeginLifetimeScope ( ) : ILifetimeScope
Результат ILifetimeScope

BeginLifetimeScope() публичный Метод

Begin a new anonymous sub-scope, with additional components available to it. Component instances created via the new scope will be disposed along with it.
public BeginLifetimeScope ( Action configurationAction ) : ILifetimeScope
configurationAction Action Action on a /// that adds component registations visible only in the new scope.
Результат ILifetimeScope

BeginLifetimeScope() публичный Метод

Begin a new tagged sub-scope. Instances created via the sub-scope will be disposed along with it.
public BeginLifetimeScope ( object tag ) : ILifetimeScope
tag object The tag applied to the .
Результат ILifetimeScope

BeginLifetimeScope() публичный Метод

Begin a new tagged sub-scope, with additional components available to it. Component instances created via the new scope will be disposed along with it.
public BeginLifetimeScope ( object tag, Action configurationAction ) : ILifetimeScope
tag object The tag applied to the .
configurationAction Action Action on a /// that adds component registations visible only in the new scope.
Результат ILifetimeScope

Dispose() защищенный Метод

Releases unmanaged and - optionally - managed resources
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
Результат void

GetOrCreateAndShare() публичный Метод

Try to retrieve an instance based on a GUID key. If the instance does not exist, invoke creator to create it.
public GetOrCreateAndShare ( System.Guid id, Func creator ) : object
id System.Guid Key to look up.
creator Func Creation function.
Результат object

LifetimeScope() публичный Метод

Create a root lifetime scope for the provided components.
public LifetimeScope ( IComponentRegistry componentRegistry ) : System
componentRegistry IComponentRegistry Components used in the scope.
Результат System

LifetimeScope() защищенный Метод

Create a lifetime scope for the provided components and nested beneath a parent.
protected LifetimeScope ( IComponentRegistry componentRegistry, LifetimeScope parent, object tag ) : System
componentRegistry IComponentRegistry Components used in the scope.
parent LifetimeScope Parent scope.
tag object The tag applied to the .
Результат System

LifetimeScope() публичный Метод

Create a root lifetime scope for the provided components.
public LifetimeScope ( IComponentRegistry componentRegistry, object tag ) : System
componentRegistry IComponentRegistry Components used in the scope.
tag object The tag applied to the .
Результат System

ResolveLookup() публичный Метод

Resolve an lookup of the provided registration within the context.
public ResolveLookup ( Service service, IComponentRegistration registration, IEnumerable parameters ) : IInstanceLookup
service Service Service which is trying to be resolved
registration IComponentRegistration The registration.
parameters IEnumerable Parameters for the instance.
Результат IInstanceLookup

Описание свойств

RootTag публичное статическое свойство

The tag applied to root scopes when no other tag is specified.
public static object RootTag
Результат object