Exemplo n.º 1
0
 /// <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;
 }
Exemplo n.º 2
0
 internal void ReportLargeBufferDiscarded(Events.MemoryStreamDiscardReason reason)
 {
     if (this.LargeBufferDiscarded != null)
     {
         this.LargeBufferDiscarded.Invoke(reason);
     }
 }
        internal void ReportLargeBufferDiscarded(Events.MemoryStreamDiscardReason reason)
        {
            var largeBufferDiscarded = Interlocked.CompareExchange(ref this.LargeBufferDiscarded, null, null);

            if (largeBufferDiscarded != null)
            {
                largeBufferDiscarded(reason);
            }
        }
Exemplo n.º 4
0
        internal void ReportLargeBufferDiscarded(
            Events.MemoryStreamDiscardReason reason)
        {
            LargeBufferDiscardedEventHandler largeBufferDiscarded = this.LargeBufferDiscarded;

            if (largeBufferDiscarded == null)
            {
                return;
            }
            largeBufferDiscarded(reason);
        }
Exemplo n.º 5
0
 internal void ReportLargeBufferDiscarded(Events.MemoryStreamDiscardReason reason)
 {
     Counter.ReportLargeBufferDiscarded();
     LargeBufferDiscarded?.Invoke(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));
 }
Exemplo n.º 7
0
        internal void ReportLargeBufferDiscarded(Events.MemoryStreamDiscardReason reason)
        {
            var largeBufferDiscarded = Interlocked.CompareExchange(ref LargeBufferDiscarded, null, null);

            largeBufferDiscarded?.Invoke(reason);
        }