本文整理汇总了C#中System.Logger.Trace方法的典型用法代码示例。如果您正苦于以下问题:C# Logger.Trace方法的具体用法?C# Logger.Trace怎么用?C# Logger.Trace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Logger
的用法示例。
在下文中一共展示了Logger.Trace方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AdministratorService
//constructor
public AdministratorService()
{
_log = new Logger("AdministratorService()");
_log.Trace("Init");
_userlog = new Logger( true, "Administrators data is changed");
}
开发者ID:mainrid,项目名称:Csharp_team_project_Conferece_Centrer_booking_sys,代码行数:7,代码来源:AdministratorService.cs
示例2: ContactService
public ContactService()
{
_log = new Logger("ContactService()");
_log.Trace("Init");
_userlog = new Logger(true, "Contacts data is changed");
}
示例3: BookingService
public BookingService()
{
_log = new Logger("BookingService()");
_log.Trace("Init");
_userlog = new Logger(true, "Bookings data is changed");
}
示例4: CustomerService
public CustomerService()
{
_log = new Logger("CustomerService()");
_log.Trace("Init");
_userlog = new Logger(true, "Customers data is changed");
}
示例5: RoomService
public RoomService()
{
_log = new Logger("RoomService()");
_log.Trace("Init");
_userlog = new Logger(true, "Rooms data is changed");
}
示例6: DispatchData
public static void DispatchData(IDataProducer producer, object data, bool cloneDataOnFork, DispatchPolicy dispatchPolicy,
Set<IDataConsumer> dataConsumers, Logger logger)
{
if (data == null) { return; }
if (dataConsumers.Count == 0)
{
if (logger != null) { logger.Warn("DispatchData", "Data ready but nobody is listening."); }
return;
}
if (dispatchPolicy == DispatchPolicy.BalanceLoadSum || dispatchPolicy == DispatchPolicy.BalanceLoadMax)
{
if (logger != null) { logger.Trace("DispatchData", "Dispatching data of type {0} (load balancing) ...", data.GetType()); }
int minLoad = int.MaxValue;
IDataConsumer target = null;
foreach (IDataConsumer consumer in dataConsumers)
{
int load = (dispatchPolicy == DispatchPolicy.BalanceLoadSum) ? GetBranchLoadSum(consumer) : GetBranchLoadMax(consumer);
if (load < minLoad) { minLoad = load; target = consumer; }
}
target.ReceiveData(producer, data);
}
else if (dispatchPolicy == DispatchPolicy.Random)
{
if (logger != null) { logger.Trace("DispatchData", "Dispatching data of type {0} (random policy) ...", data.GetType()); }
ArrayList<IDataConsumer> tmp = new ArrayList<IDataConsumer>(dataConsumers.Count);
foreach (IDataConsumer dataConsumer in dataConsumers) { tmp.Add(dataConsumer); }
tmp[mRandom.Next(0, tmp.Count)].ReceiveData(producer, data);
}
else
{
if (logger != null) { logger.Trace("DispatchData", "Dispatching data of type {0} (to-all policy) ...", data.GetType()); }
if (dataConsumers.Count > 1 && cloneDataOnFork)
{
foreach (IDataConsumer dataConsumer in dataConsumers)
{
dataConsumer.ReceiveData(producer, Utils.Clone(data, /*deepClone=*/true));
}
}
else
{
foreach (IDataConsumer dataConsumer in dataConsumers)
{
dataConsumer.ReceiveData(producer, data);
}
}
}
if (logger != null) { logger.Trace("DispatchData", "Data dispatched."); }
}
示例7: ContactTypeService
public ContactTypeService()
{
_log = new Logger("ContactTypeService()");
_log.Trace("Init");
_userlog = new Logger(true, "ContactType updated");
}
开发者ID:mainrid,项目名称:Csharp_team_project_Conferece_Centrer_booking_sys,代码行数:6,代码来源:ContactTypeService.cs