Files
Dec2017-Script-Dump/System/Diagnostics/CorrelationManager.cs
T
2026-06-04 11:42:34 +02:00

81 lines
2.6 KiB
C#

using System;
using System.Collections;
namespace System.Diagnostics
{
/// <summary>Correlates traces that are part of a logical transaction.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x020000DE RID: 222
public class CorrelationManager
{
// Token: 0x0600076C RID: 1900 RVA: 0x00013EF4 File Offset: 0x000120F4
internal CorrelationManager()
{
}
/// <summary>Gets or sets the identity for a global activity.</summary>
/// <returns>A <see cref="T:System.Guid" /> structure that identifies the global activity.</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x170001C3 RID: 451
// (get) Token: 0x0600076D RID: 1901 RVA: 0x00013F08 File Offset: 0x00012108
// (set) Token: 0x0600076E RID: 1902 RVA: 0x00013F10 File Offset: 0x00012110
public Guid ActivityId
{
get
{
return this.activity;
}
set
{
this.activity = value;
}
}
/// <summary>Gets the logical operation stack from the call context.</summary>
/// <returns>A <see cref="T:System.Collections.Stack" /> object that represents the logical operation stack for the call context.</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x170001C4 RID: 452
// (get) Token: 0x0600076F RID: 1903 RVA: 0x00013F1C File Offset: 0x0001211C
public Stack LogicalOperationStack
{
get
{
return this.op_stack;
}
}
/// <summary>Starts a logical operation on a thread.</summary>
/// <filterpriority>1</filterpriority>
// Token: 0x06000770 RID: 1904 RVA: 0x00013F24 File Offset: 0x00012124
public void StartLogicalOperation()
{
this.StartLogicalOperation(Guid.NewGuid());
}
/// <summary>Starts a logical operation with the specified identity on a thread.</summary>
/// <param name="operationId">An object identifying the operation.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="operationId" /> parameter is null. </exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06000771 RID: 1905 RVA: 0x00013F38 File Offset: 0x00012138
public void StartLogicalOperation(object operationId)
{
this.op_stack.Push(operationId);
}
/// <summary>Stops the current logical operation.</summary>
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Diagnostics.CorrelationManager.LogicalOperationStack" /> property is an empty stack.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06000772 RID: 1906 RVA: 0x00013F48 File Offset: 0x00012148
public void StopLogicalOperation()
{
this.op_stack.Pop();
}
// Token: 0x04000216 RID: 534
private Guid activity;
// Token: 0x04000217 RID: 535
private Stack op_stack = new Stack();
}
}