www.pudn.com > UptoLog_SomeTestApplication.zip > ServiceAgent.cs
using System;
using System.Collections.Generic;
using System.Text;
using UptoLog.Satellite;
using SomeWindowsApplication.SomeWebService;
namespace SomeWindowsApplication.SA
{
public class ServiceAgent
{
public Data LoadData()
{
using (Log.BeginTimeMeasure("Load data", "Load data into the client"))
{
Log.LogTraceItem("Load data into the client");
SomeService ss = new SomeService();
ss.ActivityIdHeaderValue = new ActivityIdHeader();
ss.ActivityIdHeaderValue.ActivityId = Log.CurrentActivityId.ToString();
Data data = ss.LoadSomeData();
Log.LogTraceItem("Data loaded");
return data;
}
}
public Data LoadDataWithException()
{
using (Log.BeginTimeMeasure("Load data", "Load data into the client"))
{
Log.LogTraceItem("Load data into the client");
SomeService ss = new SomeService();
ss.ActivityIdHeaderValue = new ActivityIdHeader();
ss.ActivityIdHeaderValue.ActivityId = Log.CurrentActivityId.ToString();
Data data = ss.LoadSomeDataWithException();
// This code is never reached
Log.LogTraceItem("Data loaded");
return data;
}
}
}
}