// Copyright (C) 2024 Intro-Skipper contributors // SPDX-License-Identifier: GPL-3.0-only. namespace IntroSkipper.Data; /// /// Warning manager. /// public static class WarningManager { private static PluginWarning _warnings; /// /// Set warning. /// /// Warning. public static void SetFlag(PluginWarning warning) { _warnings |= warning; } /// /// Clear warnings. /// public static void Clear() { _warnings = PluginWarning.None; } /// /// Get warnings. /// /// Warnings. public static string GetWarnings() { return _warnings.ToString(); } /// /// Check if a specific warning flag is set. /// /// Warning flag to check. /// True if the flag is set, otherwise false. public static bool HasFlag(PluginWarning warning) { return (_warnings & warning) == warning; } }