Esempio n. 1
0
 public override void Close(int ownerID, StreamID streamID)
 {
     lock (this)
     {
                         #if DEBUG
         _closeCount++;
                         #endif
         if (_streamTracingEnabled)
         {
             StreamEvents.Close(streamID);
             StreamOpens.Add(String.Format("Close {0}", streamID.Value.ToString()));
         }
         StreamHeader header = GetStreamHeader(streamID);
         InternalClose(header);
     }
 }
Esempio n. 2
0
 public override Stream Open(int ownerID, StreamID streamID, LockMode mode)
 {
     lock (this)
     {
                         #if DEBUG
         _openCount++;
                         #endif
         if (_streamTracingEnabled)
         {
             StreamEvents.Open(streamID);
             StreamOpens.Add(String.Format("Open {0}", streamID.Value.ToString()));
         }
         StreamHeader header = GetStreamHeader(streamID);
         return(new ManagedStream(this, ownerID, streamID, InternalOpen(header, false)));
     }
 }