/// <summary>
 /// Create a new per-HTTP-request lifetime scope so that state can be shared
 /// across a whole SPRequest.
 /// </summary>
 /// <param name="containerProvider">The current container provider</param>
 public SPRequestLifetimeScopeProvider(ISharePointContainerProvider containerProvider)
     : base(containerProvider)
 {
     // Subscribe our scope provider instance so that it gets notified by the HttpModule whenever the
     // current HTTP request ends.
     RequestLifetimeHttpModule.AddRequestLifetimeScopeProvider(containerProvider.ContainerKey, this);
 }
 /// <summary>
 /// Create a new per-HTTP-request lifetime scope so that state can be shared
 /// across a whole SPRequest.
 /// </summary>
 /// <param name="containerProvider">The current container provider</param>
 public SPRequestLifetimeScopeProvider(ISharePointContainerProvider containerProvider)
     : base(containerProvider)
 {
     // Subscribe our scope provider instance so that it gets notified by the HttpModule whenever the
     // current HTTP request ends.
     RequestLifetimeHttpModule.AddRequestLifetimeScopeProvider(containerProvider.ContainerKey, this);
 }
 /// <summary>
 /// Creates a new per-SPSite lifetime scope provider so that state can be shared
 /// throughout the app's lifetime on a per-site-collection basis.
 /// </summary>
 /// <param name="containerProvider">The current container provider</param>
 public SPSiteLifetimeScopeProvider(ISharePointContainerProvider containerProvider)
     : base(containerProvider)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SharePointServiceLocator"/> class.
 /// </summary>
 /// <param name="appRootNamespace">
 /// The app root namespace.
 /// </param>
 /// <param name="assemblyFileNameMatcher">
 /// 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.
 /// </param>
 public SharePointServiceLocator(string appRootNamespace, Func<string, bool> assemblyFileNameMatcher)
 {
     this.containerProvider = new SharePointContainerProvider(appRootNamespace, assemblyFileNameMatcher);
 }
Esempio n. 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SPLifetimeScopeProvider"/> class.
 /// </summary>
 /// <param name="containerProvider">
 /// The container provider.
 /// </param>
 protected SPLifetimeScopeProvider(ISharePointContainerProvider containerProvider)
 {
     this.ContainerProvider = containerProvider;
     this.ChildScopeFactory = new ChildScopeFactory();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SPLifetimeScopeProvider"/> class.
 /// </summary>
 /// <param name="containerProvider">
 /// The container provider.
 /// </param>
 protected SPLifetimeScopeProvider(ISharePointContainerProvider containerProvider)
 {
     this.ContainerProvider = containerProvider;
     this.ChildScopeFactory = new ChildScopeFactory();
 }
Esempio n. 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SPWebLifetimeScopeProvider"/> class.
 /// </summary>
 /// <param name="containerProvider">
 /// The container provider.
 /// </param>
 public SPWebLifetimeScopeProvider(ISharePointContainerProvider containerProvider)
     : base(containerProvider)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SharePointServiceLocator"/> class.
 /// </summary>
 /// <param name="appRootNamespace">
 /// The app root namespace.
 /// </param>
 /// <param name="assemblyFileNameMatcher">
 /// 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.
 /// </param>
 public SharePointServiceLocator(string appRootNamespace, Func<string, bool> assemblyFileNameMatcher)
 {
     this.containerProvider = new SharePointContainerProvider(appRootNamespace, assemblyFileNameMatcher);
 }