/// <summary> /// Enabled/disabled logging. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The event arguments.</param> private async void EnableDisableLogging(object sender, RoutedEventArgs e) { LoggingScenario loggingScenario = LoggingScenario.GetLoggingScenarioSingleton(); if (loggingScenario.IsLoggingEnabled) { rootPage.NotifyUser("Disabling logging...", NotifyType.StatusMessage); } else { rootPage.NotifyUser("Enabling logging...", NotifyType.StatusMessage); } await LoggingScenario.GetLoggingScenarioSingleton().ToggleLoggingEnabledDisabledAsync(); if (loggingScenario.IsLoggingEnabled) { rootPage.NotifyUser("Logging enabled.", NotifyType.StatusMessage); } else { rootPage.NotifyUser("Logging disabled.", NotifyType.StatusMessage); } UpdateControls(); }
/// <summary> /// A method to allowing callers to access the app's one and only LoggingScenario instance. /// </summary> /// <returns>The logging helper.</returns> static public LoggingScenario GetLoggingScenarioSingleton() { if (loggingScenario == null) { loggingScenario = new LoggingScenario(); } return(loggingScenario); }
/// <summary> /// A method to allowing callers to access the app's one and only LoggingScenario instance. /// </summary> /// <returns>The logging helper.</returns> static public LoggingScenario GetLoggingScenarioSingleton() { if (loggingScenario == null) { loggingScenario = new LoggingScenario(); } return loggingScenario; }