C# 클래스 GSoft.Dynamite.ServiceLocator.SharePointServiceLocator

Interface for the retrieval of Autofac dependency injection lifetime scopes, with SharePoint-specific semantics. Less flexible than , it is meant to encourage container usage that depends as little as possible on direct injection through the service locator pattern.
상속: ISharePointServiceLocator
파일 보기 프로젝트 열기: GSoft-SharePoint/Dynamite-2010

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
BeginLifetimeScope ( ) : ILifetimeScope

Creates a new child lifetime scope - a child to the most-nested currently available lifetime scope. In an HTTP-request context, will return a child scope to the shared per-request scope (allowing you to inject InstancePerSite, InstancePerWeb and InstancePerRequest-registered objects). Be sure to enable Dynamite's feature HttpModule feature: "GSoft.Dynamite.SP_Web Config Modifications" so that InstancePerRequest-scoped objects get properly disposed at the end of every HttpRequest. Outside an HTTP-request context, will return the a child of the root application container itself (preventing you from injecting InstancePerSite, InstancePerWeb or InstancePerRequest objects). Please dispose this lifetime scope when done (E.G. call this method from a using block).

BeginLifetimeScope ( SPFarm farm ) : ILifetimeScope

Creates a new child lifetime scope under the root application container (objects registered as InstancePerSite, InstancePerWeb or InstancePerRequest will be inaccessible). Please dispose this lifetime scope when done (E.G. call this method from a using block).

BeginLifetimeScope ( SPFeature feature ) : ILifetimeScope

Creates a new child lifetime scope that is as nested as possible, depending on the scope of the specified feature. In a SPSite or SPWeb-scoped feature context, will return a web-specific lifetime scope (allowing you to inject InstancePerSite and InstancePerWeb objects - InstancePerRequest scoped objects will be inaccessible). In a SPFarm or SPWebApplication feature context, will return a child container of the root application container (preventing you from injecting InstancePerSite, InstancePerWeb or InstancePerRequest objects). Please dispose this lifetime scope when done (E.G. call this method from a using block).

BeginLifetimeScope ( SPSite site ) : ILifetimeScope

Creates a new child lifetime scope under the scope of the specified site collection (allowing you to inject InstancePerSite objects - InstancePerWeb and InstancePerRequest scoped objects will be inaccessible). Please dispose this lifetime scope when done (E.G. call this method from a using block).

BeginLifetimeScope ( SPWeb web ) : ILifetimeScope

Creates a new child lifetime scope under the scope of the specified web (allowing you to inject InstancePerSite and InstancePerWeb objects - InstancePerRequest scoped objects will be inaccessible). Please dispose this lifetime scope when done (E.G. call this method from a using block).

BeginLifetimeScope ( SPWebApplication webApplication ) : ILifetimeScope

Creates a new child lifetime scope under the root application container (objects registered as InstancePerSite, InstancePerWeb or InstancePerRequest will be inaccessible). Please dispose this lifetime scope when done (E.G. call this method from a using block).

SharePointServiceLocator ( string appRootNamespace ) : System

Initializes a new instance of the SharePointServiceLocator class.

SharePointServiceLocator ( string appRootNamespace, bool>.Func assemblyFileNameMatcher ) : System

Initializes a new instance of the SharePointServiceLocator class.

메소드 상세

BeginLifetimeScope() 공개 메소드

Creates a new child lifetime scope - a child to the most-nested currently available lifetime scope. In an HTTP-request context, will return a child scope to the shared per-request scope (allowing you to inject InstancePerSite, InstancePerWeb and InstancePerRequest-registered objects). Be sure to enable Dynamite's feature HttpModule feature: "GSoft.Dynamite.SP_Web Config Modifications" so that InstancePerRequest-scoped objects get properly disposed at the end of every HttpRequest. Outside an HTTP-request context, will return the a child of the root application container itself (preventing you from injecting InstancePerSite, InstancePerWeb or InstancePerRequest objects). Please dispose this lifetime scope when done (E.G. call this method from a using block).
public BeginLifetimeScope ( ) : ILifetimeScope
리턴 ILifetimeScope

BeginLifetimeScope() 공개 메소드

Creates a new child lifetime scope under the root application container (objects registered as InstancePerSite, InstancePerWeb or InstancePerRequest will be inaccessible). Please dispose this lifetime scope when done (E.G. call this method from a using block).
public BeginLifetimeScope ( SPFarm farm ) : ILifetimeScope
farm SPFarm
리턴 ILifetimeScope

BeginLifetimeScope() 공개 메소드

Creates a new child lifetime scope that is as nested as possible, depending on the scope of the specified feature. In a SPSite or SPWeb-scoped feature context, will return a web-specific lifetime scope (allowing you to inject InstancePerSite and InstancePerWeb objects - InstancePerRequest scoped objects will be inaccessible). In a SPFarm or SPWebApplication feature context, will return a child container of the root application container (preventing you from injecting InstancePerSite, InstancePerWeb or InstancePerRequest objects). Please dispose this lifetime scope when done (E.G. call this method from a using block).
public BeginLifetimeScope ( SPFeature feature ) : ILifetimeScope
feature SPFeature The current feature context from which we are requesting a child lifetime scope
리턴 ILifetimeScope

BeginLifetimeScope() 공개 메소드

Creates a new child lifetime scope under the scope of the specified site collection (allowing you to inject InstancePerSite objects - InstancePerWeb and InstancePerRequest scoped objects will be inaccessible). Please dispose this lifetime scope when done (E.G. call this method from a using block).
public BeginLifetimeScope ( SPSite site ) : ILifetimeScope
site SPSite The current site collection from which we are requesting a child lifetime scope
리턴 ILifetimeScope

BeginLifetimeScope() 공개 메소드

Creates a new child lifetime scope under the scope of the specified web (allowing you to inject InstancePerSite and InstancePerWeb objects - InstancePerRequest scoped objects will be inaccessible). Please dispose this lifetime scope when done (E.G. call this method from a using block).
public BeginLifetimeScope ( SPWeb web ) : ILifetimeScope
web SPWeb The current web from which we are requesting a child lifetime scope
리턴 ILifetimeScope

BeginLifetimeScope() 공개 메소드

Creates a new child lifetime scope under the root application container (objects registered as InstancePerSite, InstancePerWeb or InstancePerRequest will be inaccessible). Please dispose this lifetime scope when done (E.G. call this method from a using block).
public BeginLifetimeScope ( SPWebApplication webApplication ) : ILifetimeScope
webApplication SPWebApplication The current context's web application
리턴 ILifetimeScope

SharePointServiceLocator() 공개 메소드

Initializes a new instance of the SharePointServiceLocator class.
public SharePointServiceLocator ( string appRootNamespace ) : System
appRootNamespace string /// The app root namespace. ///
리턴 System

SharePointServiceLocator() 공개 메소드

Initializes a new instance of the SharePointServiceLocator class.
public SharePointServiceLocator ( string appRootNamespace, bool>.Func assemblyFileNameMatcher ) : System
appRootNamespace string /// The app root namespace. ///
assemblyFileNameMatcher bool>.Func /// The assembly file name matcher (will be used instead of the appRootNamespace to /// match assembly names in the GAC). The appRootNamespace still acts as the provided /// container's unique key among all the other containers that live in the AppDomain. ///
리턴 System