/// <summary> /// 生成一个范围 /// </summary> /// <returns></returns> public static IDisposable CreateScope(string name = null) { Local.Value = new LocalValueType(name ?? "Scope", new DependencyObjects(), new List <Action>(), IocHelper.Create <ILoggerFactory>().CreateLogger(name ?? "Log")); return(new IocScope { _scope = IocHelper.CreateScope() }); }
/// <summary> /// 生成一个范围 /// </summary> /// <returns></returns> public static IDisposable CreateScope() { IocHelper.CreateScope(); return(new IocScope()); }