private static void FireFlushEvent() { if (_flushEvent != null) { Log.LogVerbose(LogTitle, "----------========== Firing Flush Events ==========----------"); int startTime = Environment.TickCount; FlushEventDelegate flushEvent = _flushEvent; flushEvent(new FlushEventArgs()); int endTime = Environment.TickCount; Log.LogVerbose(LogTitle, string.Format("----------========== Done firing Flush Events ({0} ms ) ==========----------", endTime - startTime)); } }
/// <exclude /> public static void UnsubscribeFromFlushEvent(FlushEventDelegate eventDelegate) { _flushEvent -= eventDelegate; }
/// <summary> /// Flush code MAY NOT do ANY kind of re-initialization. /// </summary> /// <param name="eventDelegate"></param> public static void SubscribeToFlushEvent(FlushEventDelegate eventDelegate) { _flushEvent += eventDelegate; }