CorrelationManager.StartLogicalOperation Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Starts a logical operation on a thread.
Overloads
StartLogicalOperation() |
Starts a logical operation on a thread. |
StartLogicalOperation(Object) |
Starts a logical operation with the specified identity on a thread. |
StartLogicalOperation()
- Source:
- CorrelationManager.cs
- Source:
- CorrelationManager.cs
- Source:
- CorrelationManager.cs
Starts a logical operation on a thread.
public:
void StartLogicalOperation();
public void StartLogicalOperation ();
member this.StartLogicalOperation : unit -> unit
Public Sub StartLogicalOperation ()
Remarks
The logical operation is started using an automatically generated GUID for a logical operation identifier.
Applies to
StartLogicalOperation(Object)
- Source:
- CorrelationManager.cs
- Source:
- CorrelationManager.cs
- Source:
- CorrelationManager.cs
Starts a logical operation with the specified identity on a thread.
public:
void StartLogicalOperation(System::Object ^ operationId);
public void StartLogicalOperation (object operationId);
member this.StartLogicalOperation : obj -> unit
Public Sub StartLogicalOperation (operationId As Object)
Parameters
- operationId
- Object
An object identifying the operation.
Exceptions
The operationId
parameter is null
.
Examples
The following code example demonstrates the use of the StartLogicalOperation(Object) method by initializing a logical operation to be associated with the main thread. For the complete code example, see the CorrelationManager class.
TraceSource ts = new TraceSource("MyApp");
int i = ts.Listeners.Add(new ConsoleTraceListener());
ts.Listeners[i].TraceOutputOptions = TraceOptions.LogicalOperationStack;
ts.Switch = new SourceSwitch("MyAPP", "Verbose");
// Start the logical operation on the Main thread.
Trace.CorrelationManager.StartLogicalOperation("MainThread");
Dim ts As New TraceSource("MyApp")
Dim i As Integer = ts.Listeners.Add(New ConsoleTraceListener())
ts.Listeners(i).TraceOutputOptions = TraceOptions.LogicalOperationStack
ts.Switch = New SourceSwitch("MyAPP", "Verbose")
' Start the logical operation on the Main thread.
Trace.CorrelationManager.StartLogicalOperation("MainThread")
Remarks
The operationId
parameter can be any object, such as a String that allows the operation to be identified for tracing purposes. The object represented by operationId
is added to the LogicalOperationStack property.
Applies to
Atsauksmes
https://aka.ms/ContentUserFeedback.
Drīzumā: 2024. gada laikā mēs pakāpeniski pārtrauksim izmantot “GitHub problēmas” kā atsauksmju par saturu mehānismu un aizstāsim to ar jaunu atsauksmju sistēmu. Papildinformāciju skatiet:Iesniegt un skatīt atsauksmes par