public static bool ContainsEvent(string name) { if (!IsEnabled) { return(false); } return(OpenEvents.ContainsKey(name)); }
public static void EndEvent(string name) { if (IsEnabled) { Debug.Assert(OpenEvents.ContainsKey(name), "Trying to end an event that is not open."); OpenEvents[name].Dispose(); OpenEvents.Remove(name); } }