本文整理匯總了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