// other constructors can be added later, as we need them, for now we only use the following 2 internal TrackingMemoryStream(ITrackingMemoryStreamFactory memoryStreamFactory) : base() { // although we could have implemented this constructor in terms of the other constructor; we shouldn't. // It seems safer to always call the equivalent base class constructor, as we might be ignorant about // some minor differences between various MemoryStream constructors Debug.Assert(memoryStreamFactory != null); _memoryStreamFactory = memoryStreamFactory; ReportIfNeccessary(); }
// other constructors can be added later, as we need them, for now we only use the following 2 internal TrackingMemoryStream(ITrackingMemoryStreamFactory memoryStreamFactory): base() { // although we could have implemented this constructor in terms of the other constructor; we shouldn't. // It seems safer to always call the equivalent base class constructor, as we might be ignorant about // some minor differences between various MemoryStream constructors Debug.Assert(memoryStreamFactory != null); _memoryStreamFactory = memoryStreamFactory; ReportIfNeccessary(); }
protected override void Dispose(bool disposing) { try { if (disposing && (this._memoryStreamFactory != null)) { this.SetLength(0L); this.Capacity = 0; this.ReportIfNeccessary(); this._memoryStreamFactory = null; } } finally { base.Dispose(disposing); } }
internal TrackingMemoryStream(ITrackingMemoryStreamFactory memoryStreamFactory, int capacity) : base(capacity) { this._memoryStreamFactory = memoryStreamFactory; this.ReportIfNeccessary(); }
// Methods internal TrackingMemoryStream(ITrackingMemoryStreamFactory memoryStreamFactory) { this._memoryStreamFactory = memoryStreamFactory; this.ReportIfNeccessary(); }
internal TrackingMemoryStream(ITrackingMemoryStreamFactory memoryStreamFactory, Int32 capacity) : base(capacity) { Debug.Assert(memoryStreamFactory != null); _memoryStreamFactory = memoryStreamFactory; ReportIfNeccessary(); }
internal TrackingMemoryStream (ITrackingMemoryStreamFactory memoryStreamFactory, Int32 capacity) : base(capacity) { Debug.Assert(memoryStreamFactory != null); _memoryStreamFactory = memoryStreamFactory; ReportIfNeccessary(); }