Пример #1
0
 public static IsmartLogger GetSmartCustomLogger(bool invalidate)
 {
     if (smartLoggerCustomInstance == null || invalidate)
     {
         smartLoggerCustomInstance = new SmartCustomLog();
     }
     return(smartLoggerCustomInstance);
 }
Пример #2
0
        /// <summary>
        /// Function to create Instance for SmartGenericLog or SmartCustomLog
        /// </summary>
        /// <returns></returns>
        public static IsmartLogger GetLogTypeInstance()
        {
            SmartLog objSmart = new SmartLog();
            bool     flag;

            bool result = bool.TryParse(objSmart.GetSettingsFromConfigFile(), out flag);

            if (result)
            {
                if (flag)
                {
                    Log = SmartCustomLog.GetSmartCustomLogger(true);
                    return(Log);
                }
            }
            Log = SmartGenericLog.GetSmartGenericLogger(true);
            return(Log);
        }
Пример #3
0
        static SmartLog()
        {
            SmartLog objSmart = new SmartLog();
            bool     flag;

            bool result = Boolean.TryParse(objSmart.GetSettingsFromConfigFile(), out flag);

            if (result)
            {
                if (flag)
                {
                    Log = SmartCustomLog.GetSmartCustomLogger(true);
                }
                else
                {
                    Log = SmartGenericLog.GetSmartGenericLogger(true);
                }
            }
        }
Пример #4
0
 /// <summary>
 /// Invalidate object.
 /// </summary>
 public static void Invalidate()
 {
     smartLoggerCustomInstance = null;
 }