コード例 #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;
 }
コード例 #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);
            }
        }
コード例 #4
0
        internal void ReportLargeBufferDiscarded(
            Events.MemoryStreamDiscardReason reason)
        {
            LargeBufferDiscardedEventHandler largeBufferDiscarded = this.LargeBufferDiscarded;

            if (largeBufferDiscarded == null)
            {
                return;
            }
            largeBufferDiscarded(reason);
        }
コード例 #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));
 }
コード例 #7
0
        internal void ReportLargeBufferDiscarded(Events.MemoryStreamDiscardReason reason)
        {
            var largeBufferDiscarded = Interlocked.CompareExchange(ref LargeBufferDiscarded, null, null);

            largeBufferDiscarded?.Invoke(reason);
        }