Ejemplo n.º 1
0
 /// <summary>
 /// Dispose of all <see cref="IDisposable"/> object registered with the registry and make it unusable.
 /// </summary>
 public void Dispose()
 {
     if (disposed)
     {
         return;
     }
     disposed = true;
     foreach (var item in scope.GetKeyValues(typeof(object)).Select(x => x.value).OfType <IDisposable>())
     {
         item.Dispose();
     }
     scope.Clear();
 }