/// <summary> /// Wraps the current Music Service into one that logs the activity. /// </summary> public static void EnableMusicLogging() { // We don't wrap it again if it is already wrapped if (GetMusicService() as LoggedMusicService == null) { MusicService loggedService = new LoggedMusicService(GetMusicService()); ProvideMusicService(loggedService); } }
/// <summary> /// Unwraps the current Logged Music Service. /// </summary> public static void DisableMusicLogging() { // Don't unwrap if it's not a Logged one LoggedMusicService service = GetMusicService() as LoggedMusicService; if (service != null) { ProvideMusicService(service.WrappedService); } }