/// <summary> /// Removes subscription A from this subscription if possible. /// </summary> /// <returns></returns> public void Remove(MessageAttributeFilter a) { m_componentMessageSuppression = m_componentMessageSuppression & ~a.m_componentMessageSuppression; m_componentLevel = m_componentLevel & ~a.m_componentLevel; m_componentFlags = m_componentFlags & ~a.m_componentFlags; m_frameworkMessageSuppression = m_frameworkMessageSuppression & ~a.m_frameworkMessageSuppression; m_frameworkLevel = m_frameworkLevel & ~a.m_frameworkLevel; m_frameworkFlags = m_frameworkFlags & ~a.m_frameworkFlags; m_applicationMessageSuppression = m_applicationMessageSuppression & ~a.m_applicationMessageSuppression; m_applicationLevel = m_applicationLevel & ~a.m_applicationLevel; m_applicationFlags = m_applicationFlags & ~a.m_applicationFlags; }
/// <summary> /// Does a Union of the two subscriptions. /// </summary> /// /// <returns></returns> public void Append(MessageAttributeFilter a) { m_componentMessageSuppression = m_componentMessageSuppression | a.m_componentMessageSuppression; m_componentLevel = m_componentLevel | a.m_componentLevel; m_componentFlags = m_componentFlags | a.m_componentFlags; m_frameworkMessageSuppression = m_frameworkMessageSuppression | a.m_frameworkMessageSuppression; m_frameworkLevel = m_frameworkLevel | a.m_frameworkLevel; m_frameworkFlags = m_frameworkFlags | a.m_frameworkFlags; m_applicationMessageSuppression = m_applicationMessageSuppression | a.m_applicationMessageSuppression; m_applicationLevel = m_applicationLevel | a.m_applicationLevel; m_applicationFlags = m_applicationFlags | a.m_applicationFlags; }
private MessageAttributeFilter(VerboseLevel verbose) { m_componentLevel = MessageLevelFlags.Error | MessageLevelFlags.Critical; m_componentMessageSuppression = MessageSuppressionFlags.None; m_componentFlags = MessageFlags.BugReport | MessageFlags.SystemHealth; m_frameworkLevel = MessageLevelFlags.Error | MessageLevelFlags.Critical; m_frameworkMessageSuppression = MessageSuppressionFlags.None; m_frameworkFlags = MessageFlags.BugReport | MessageFlags.SystemHealth; m_applicationLevel = MessageLevelFlags.Error | MessageLevelFlags.Critical; m_applicationMessageSuppression = MessageSuppressionFlags.None; m_applicationFlags = MessageFlags.BugReport | MessageFlags.SystemHealth; if (verbose >= VerboseLevel.Low) { m_componentLevel |= MessageLevelFlags.Error; m_componentFlags |= MessageFlags.None; m_frameworkLevel |= MessageLevelFlags.Error; m_frameworkFlags |= MessageFlags.None; m_applicationLevel |= MessageLevelFlags.Warning; m_applicationFlags |= MessageFlags.None; } if (verbose >= VerboseLevel.Medium) { m_componentLevel |= MessageLevelFlags.Warning; m_componentFlags |= MessageFlags.SecurityMessage; m_frameworkLevel |= MessageLevelFlags.Warning; m_frameworkFlags |= MessageFlags.SecurityMessage; m_applicationLevel |= MessageLevelFlags.Info; m_applicationFlags |= MessageFlags.SecurityMessage; } if (verbose >= VerboseLevel.High) { m_componentLevel |= MessageLevelFlags.Info; m_componentFlags |= MessageFlags.UsageIssue; m_frameworkLevel |= MessageLevelFlags.Info; m_frameworkFlags |= MessageFlags.UsageIssue; m_applicationLevel |= MessageLevelFlags.Debug; m_applicationFlags |= MessageFlags.UsageIssue; } if (verbose >= VerboseLevel.Ultra) { m_componentLevel |= MessageLevelFlags.Debug; m_componentFlags |= MessageFlags.PerformanceIssue; m_frameworkLevel |= MessageLevelFlags.Debug; m_frameworkFlags |= MessageFlags.PerformanceIssue; m_applicationLevel |= MessageLevelFlags.Debug; m_applicationFlags |= MessageFlags.PerformanceIssue; } if (verbose >= VerboseLevel.All) { m_componentLevel |= MessageLevelFlags.Debug; m_componentFlags |= MessageFlags.PerformanceIssue; m_frameworkLevel |= MessageLevelFlags.Debug; m_frameworkFlags |= MessageFlags.PerformanceIssue; m_applicationLevel |= MessageLevelFlags.Debug; m_applicationFlags |= MessageFlags.PerformanceIssue; } if (verbose >= VerboseLevel.All) { m_componentMessageSuppression = MessageSuppressionFlags.Standard | MessageSuppressionFlags.Heavy | MessageSuppressionFlags.Severe; m_frameworkMessageSuppression = MessageSuppressionFlags.Standard | MessageSuppressionFlags.Heavy | MessageSuppressionFlags.Severe; m_applicationMessageSuppression = MessageSuppressionFlags.Standard | MessageSuppressionFlags.Heavy | MessageSuppressionFlags.Severe; } }