Example #1
0
 /// <summary>
 /// 清理资源
 /// </summary>
 protected override void OnDispose()
 {
     if (DisposeFunc != null)
     {
         foreach (var func in DisposeFunc)
         {
             try
             {
                 func();
             }
             catch (Exception e)
             {
                 Console.WriteLine(e);
             }
         }
         Local.Value = null;
     }
     try
     {
         IocHelper.DisposeScope();
         _scope.Dispose();
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
     }
     GC.Collect();
 }
Example #2
0
 /// <summary>
 /// 清理资源
 /// </summary>
 protected override void OnDispose()
 {
     IocHelper.DisposeScope();
 }