Castle.MicroKernel.Lifestyle.Scoped.ThreadStaticLifetimeScope.ObtainCurrentScope C# (CSharp) Method

ObtainCurrentScope() public static method

public static ObtainCurrentScope ( ) : ThreadStaticLifetimeScope
return ThreadStaticLifetimeScope
		public static ThreadStaticLifetimeScope ObtainCurrentScope()
		{
			return currentScope;
		}
	}

Usage Example

Example #1
0
        public void Dispose()
        {
            var scope = Scope.ObtainCurrentScope();

            if (scope != null)
            {
                scope.Dispose();
            }
        }
All Usage Examples Of Castle.MicroKernel.Lifestyle.Scoped.ThreadStaticLifetimeScope::ObtainCurrentScope