How should you complete the relevant code?

HOTSPOT
You are developing an application that includes a Windows Communication Foundation (WCF)
service. The service includes a custom TraceSource object named ts and a method named DoWork.
The application must meet the following requirements:
Collect trace information when the DoWork() method executes.
Group all traces for a single execution of the DoWork() method as an activity that can be viewed in
the WCF Service Trace Viewer Tool.
You need to ensure that the application meets the requirements.
How should you complete the relevant code? (To answer, select the correct code segment from each
drop-down list in the answer area.)

HOTSPOT
You are developing an application that includes a Windows Communication Foundation (WCF)
service. The service includes a custom TraceSource object named ts and a method named DoWork.
The application must meet the following requirements:
Collect trace information when the DoWork() method executes.
Group all traces for a single execution of the DoWork() method as an activity that can be viewed in
the WCF Service Trace Viewer Tool.
You need to ensure that the application meets the requirements.
How should you complete the relevant code? (To answer, select the correct code segment from each
drop-down list in the answer area.)

Answer:



Leave a Reply 2

Your email address will not be published. Required fields are marked *


Lord Vader

Lord Vader

public void TraceTransfer(
int id,
string message,
Guid relatedActivityId
)

TraceTransfer is intended to be used with the logical operations of a CorrelationManager. The relatedActivityId parameter relates to the ActivityId property of a CorrelationManager object. If a logical operation begins in one activity and transfers to another, the second activity logs the transfer by calling the TraceTransfer method. The TraceTransfer call relates the new activity identity to the previous identity. The most likely consumer of this functionality is a trace viewer that can report logical operations that span multiple activities.