Exemplo n.º 1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         try
         {
             dir.MaybeThrowDeterministicException();
         }
         finally
         {
             @delegate.Dispose();
             if (dir.trackDiskUsage)
             {
                 // Now compute actual disk usage & track the maxUsedSize
                 // in the MockDirectoryWrapper:
                 long size = dir.GetRecomputedActualSizeInBytes();
                 if (size > dir.maxUsedSize)
                 {
                     dir.maxUsedSize = size;
                 }
             }
             dir.RemoveIndexOutput(this, name);
         }
     }
 }
Exemplo n.º 2
0
 public override void Dispose()
 {
     try
     {
         Dir.MaybeThrowDeterministicException();
     }
     finally
     {
         @delegate.Dispose();
         if (Dir.TrackDiskUsage_Renamed)
         {
             // Now compute actual disk usage & track the maxUsedSize
             // in the MockDirectoryWrapper:
             long size = Dir.RecomputedActualSizeInBytes;
             if (size > Dir.MaxUsedSize)
             {
                 Dir.MaxUsedSize = size;
             }
         }
         Dir.RemoveIndexOutput(this, Name);
     }
 }