﻿<?xml version="1.0" encoding="utf-8"?><Type Name="CorrelationManager" FullName="System.Diagnostics.CorrelationManager"><TypeSignature Language="C#" Value="public class CorrelationManager" /><TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit CorrelationManager extends System.Object" /><AssemblyInfo><AssemblyName>System</AssemblyName><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Base><BaseTypeName>System.Object</BaseTypeName></Base><Interfaces /><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Traces generated from a single logical operation can be tagged with an operation-unique identity, in order to distinguish them from traces from a different logical operation. For example, it may be useful to group correlated traces by ASP.NET request. The <see cref="T:System.Diagnostics.CorrelationManager" /> class provides methods used to store a logical operation identity in a thread-bound context and automatically tag each trace event generated by the thread with the stored identity. </para><para>Logical operations can also be nested. The <see cref="P:System.Diagnostics.CorrelationManager.LogicalOperationStack" /> property exposes the stack of nested logical operation identities. Each call to the <see cref="Overload:System.Diagnostics.CorrelationManager.StartLogicalOperation" /> method pushes a new logical operation identity onto the stack. Each call to the <see cref="M:System.Diagnostics.CorrelationManager.StopLogicalOperation" /> method pops a logical operation identity off the stack. </para><block subset="none" type="note"><para>Logical operation identities are objects, allowing the use of a type for a logical operation identity. </para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Correlates traces that are part of a logical transaction.</para></summary></Docs><Members><Member MemberName="ActivityId"><MemberSignature Language="C#" Value="public Guid ActivityId { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance valuetype System.Guid ActivityId" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Guid</ReturnType></ReturnValue><Docs><value>To be added.</value><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="P:System.Diagnostics.CorrelationManager.ActivityId" /> property gets and sets the global activity identity in the <see cref="T:System.Runtime.Remoting.Messaging.CallContext" /> for the thread. The <see cref="P:System.Diagnostics.CorrelationManager.ActivityId" /> is used for trace transfer operations in trace listeners that override the <see cref="M:System.Diagnostics.TraceListener.TraceTransfer(System.Diagnostics.TraceEventCache,System.String,System.Int32,System.String,System.Guid)" /> method, such as the <see cref="T:System.Diagnostics.XmlWriterTraceListener" /> class. </para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets or sets the identity for a global activity.</para></summary></Docs></Member><Member MemberName="LogicalOperationStack"><MemberSignature Language="C#" Value="public System.Collections.Stack LogicalOperationStack { get; }" /><MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Stack LogicalOperationStack" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Collections.Stack</ReturnType></ReturnValue><Docs><value>To be added.</value><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Each call to the <see cref="Overload:System.Diagnostics.CorrelationManager.StartLogicalOperation" /> method pushes a new logical operation identity onto the <see cref="P:System.Diagnostics.CorrelationManager.LogicalOperationStack" /> property's stack. Each call to the <see cref="M:System.Diagnostics.CorrelationManager.StopLogicalOperation" /> method pops a logical operation identity from the stack.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets the logical operation stack from the call context.</para></summary></Docs></Member><Member MemberName="StartLogicalOperation"><MemberSignature Language="C#" Value="public void StartLogicalOperation ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance void StartLogicalOperation() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters /><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The logical operation is started using an automatically generated GUID for a logical operation identifier.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Starts a logical operation on a thread.</para></summary></Docs></Member><Member MemberName="StartLogicalOperation"><MemberSignature Language="C#" Value="public void StartLogicalOperation (object operationId);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance void StartLogicalOperation(object operationId) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters><Parameter Name="operationId" Type="System.Object" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <paramref name="operationId" /> parameter can be any object, such as a <see cref="T:System.String" /> that allows the operation to be identified for tracing purposes. The object represented by <paramref name="operationId" /> is added to the <see cref="P:System.Diagnostics.CorrelationManager.LogicalOperationStack" /> property.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Starts a logical operation with the specified identity on a thread.</para></summary><param name="operationId"><attribution license="cc4" from="Microsoft" modified="false" />An object identifying the operation.</param></Docs></Member><Member MemberName="StopLogicalOperation"><MemberSignature Language="C#" Value="public void StopLogicalOperation ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig instance void StopLogicalOperation() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters /><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The logical operation is halted and the logical operation identity is removed from the <see cref="P:System.Diagnostics.CorrelationManager.LogicalOperationStack" /> property.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Stops the current logical operation.</para></summary></Docs></Member></Members></Type>