/// <summary> /// Deactivates the log tags by removing the supplied tags from those already active. /// </summary> /// <param name="tagNames">The tag names</param> public static void DeactivateLogTags(IEnumerable <string> tagNames) { foreach (string tagName in tagNames) { ActiveLogTags.Remove(tagName); } }
/// <summary> /// Activates the log tags by adding the supplied tags to those already active. If you want to reset the list, pass a /// null so you can start again. /// </summary> /// <param name="tagNames">The tag names or null to reset the list.</param> public static void ActivateLogTags(IEnumerable <string> tagNames) { if (tagNames == null) { ActiveLogTags.Clear(); } else { ActiveLogTags.AddRange(tagNames); } }
/// <summary> /// Determines whether the specified log tag is either null or active. /// </summary> /// <returns> /// <c>true</c> if the specified log tag is either null or active; otherwise, <c>false</c>. /// </returns> public bool IsActive() { beenChecked = true; bool retVal = ActiveLogTags.Contains(Name); if (!retVal && (Parent != null) && !Parent.beenChecked) { retVal = Parent.IsActive(); } if (!retVal && (ScopeParent != null) && !ScopeParent.beenChecked) { retVal = ScopeParent.IsActive(); } beenChecked = false; return(retVal); }
/// <summary> /// Deactivates the log tag by removing it from the list of those already active. /// </summary> /// <param name="tagName">Name of the tag - null not allowed!.</param> public static void DeactivateLogTag(string tagName) { ActiveLogTags.Remove(tagName); }
/// <summary> /// Deactivates the log tag by removing it from the list of those already active. /// </summary> /// <param name="tag">The tag to deactivate</param> public static void DeactivateLogTag(LogTag tag) { ActiveLogTags.Remove(tag.Name); }
/// <summary> /// Activates the log tag by adding it to the list of those already active. /// </summary> /// <param name="tag">LogTag to activate</param> public static void ActivateLogTag(LogTag tag) { ActiveLogTags.Add(tag.Name); }
/// <summary> /// Activates the log tag by adding it to the list of those already active. /// </summary> /// <param name="tagName">Name of the tag - null not allowed!.</param> public static void ActivateLogTag(string tagName) { ActiveLogTags.Add(tagName); }