Пример #1
0
 public static double GetTime(TimeSpan t, TimeProfileElement.timeunit tUnit)
 {
     if (tUnit == TimeProfileElement.timeunit.miliseconds)
     {
         return(t.TotalMilliseconds);
     }
     else
     {
         return(t.TotalSeconds);
     }
 }
 public WcfProfileLogger() {
   ParseConfigManager.ProfileInfo pInfo = ParseConfigManager.profileInfo;
   bool doProfile = ParseConfigManager.doTimeProfile();
   if (doProfile)
   {
     logger = Logger.Instance.getLog(pInfo.loggerToUse);
     tUnit = pInfo.timeAs;
   }
   else
   {
     throw new Exception("Should not call wcfProfileLogger if not doing time profile");
   }
 }
        public WcfTimeProfileEndPointLogger()
        {
            ParseConfigManager.ProfileInfo pInfo = ParseConfigManager.profileInfo;
            bool doProfile = ParseConfigManager.DoTimeProfile();

            if (doProfile)
            {
                _logger = Logger.Instance.getLog(pInfo.loggerToUse);
                _tUnit  = pInfo.timeAs;
            }
            else
            {
                throw new Exception("Should not call wcfProfileLogger if not doing time profile");
            }
        }