/// <summary> /// /// </summary> /// <param name="logMode"></param> /// <returns></returns> public static ILoggingAdapter GetObject(string logMode) { try { if (ExtensionMethods.IsInDesignMode()) { return(new DesignTimeAdapter()); } if (logMode == "XML") { return(new XMLLogAdapter()); } else if (logMode == "DB") { return(new DBLogAdapter()); } else if (logMode == "EVENTLOG") { return(new EventLogAdapter()); } else { return(TextLogAdapter.GetInstance()); } } catch (Exception) { throw; } }
public static TextLogAdapter GetInstance() { if (textLogAdapter == null) { lock (lockObject) { if (textLogAdapter == null) textLogAdapter = new TextLogAdapter(); } } return textLogAdapter; }
public static TextLogAdapter GetInstance() { if (textLogAdapter == null) { lock (lockObject) { if (textLogAdapter == null) { textLogAdapter = new TextLogAdapter(); } } } return(textLogAdapter); }