コード例 #1
0
        public static ILifetimeScope CreateLifetimeScope(Autofac.ILifetimeScope scope)
        {
            var iocScope = new IocLifetimeScope(scope);

            CallContextUtility.SetData <ILifetimeScope>(iocScope);
            return(iocScope);
        }
コード例 #2
0
ファイル: IocManager.cs プロジェクト: lansebeiji/RabbitMqDemo
        public static ILifetimeScope BeginLifetimeScope()
        {
            var scope = IocManager.Instance.Container.BeginLifetimeScope();

            return(IocLifetimeScope.CreateLifetimeScope(scope));
        }