/// <summary> /// Initializes a new instance of the <see cref="BufferDiscardedEventArgs"/> class. /// </summary> /// <param name="guid">Unique ID of the stream.</param> /// <param name="tag">Tag of the stream.</param> /// <param name="bufferType">Type of buffer being discarded.</param> /// <param name="reason">The reason for the discard.</param> internal BufferDiscardedEventArgs(Guid guid, string tag, Events.MemoryStreamBufferType bufferType, Events.MemoryStreamDiscardReason reason) { this.Id = guid; this.Tag = tag; this.BufferType = bufferType; this.Reason = reason; }
internal void ReportBufferDiscarded(Guid id, string tag, Events.MemoryStreamBufferType bufferType, Events.MemoryStreamDiscardReason reason) { Events.Writer.MemoryStreamDiscardBuffer(id, tag, bufferType, reason); this.BufferDiscarded?.Invoke(this, new BufferDiscardedEventArgs(id, tag, bufferType, reason)); }