Ejemplo n.º 1
0
 /// <summary>
 /// Releases all resources consumed by the current <see cref="DependencyContainer{TContainer, TConfigurator}" />.
 /// </summary>
 /// <param name="disposing">
 /// A value indicating whether or not managed resources should be released.
 /// </param>
 protected override void Dispose(Boolean disposing)
 {
     try
     {
         if (disposing)
         {
             using (var controlToken = StateControl.Enter())
             {
                 try
                 {
                     LazySourceContainer.Dispose();
                     LazyRootScope.Dispose();
                 }
                 finally
                 {
                     LazyReferenceManager.Dispose();
                 }
             }
         }
     }
     finally
     {
         base.Dispose(disposing);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Releases all resources consumed by the current <see cref="DependencyScope{TScope}" />.
 /// </summary>
 /// <param name="disposing">
 /// A value indicating whether or not managed resources should be released.
 /// </param>
 protected override void Dispose(Boolean disposing)
 {
     try
     {
         if (disposing)
         {
             SourceScope.Dispose();
             LazyReferenceManager.Dispose();
         }
     }
     finally
     {
         base.Dispose(disposing);
     }
 }