public static void LogComment(string format, params object[] args) { if (_ProcLogEnabled && Log != null) { KhronosLogEventArgs e = new KhronosLogEventArgs(format, args); foreach (EventHandler <KhronosLogEventArgs> eventHandler in Log.GetInvocationList()) { try { eventHandler(null, e); } catch { /* Fail-safe */ } } } }
/// <summary> /// Utility route for raising <see cref="Log"/> event. /// </summary> /// <param name="args"> /// The <see cref="KhronosLogEventArgs"/> passed to the event handlers. /// </param> protected static void RaiseLog(KhronosLogEventArgs args) { if (args == null) { throw new ArgumentNullException("args"); } if (_ProcLogEnabled && Log != null) { foreach (EventHandler <KhronosLogEventArgs> eventHandler in Log.GetInvocationList()) { try { eventHandler(null, args); } catch { /* Fail-safe */ } } } }