private void InitializeAudio() { IAudioService audio = new DefaultAudioService(); if (!string.IsNullOrEmpty(settings.Audio.Error)) { audio.Register(new Audio() { Url = string.Join("", System.AppDomain.CurrentDomain.BaseDirectory, settings.Audio.Error), Type = AudioEnum.Error }); } if (!string.IsNullOrEmpty(settings.Audio.Warning)) { audio.Register(new Audio() { Url = string.Join("", System.AppDomain.CurrentDomain.BaseDirectory, settings.Audio.Warning), Type = AudioEnum.Warning }); } ObjectPool.Instance.Register <IAudioService>().ImplementedBy(audio); }
private void InitializeAudio() { IAudioService audio = new DefaultAudioService(); if (!string.IsNullOrEmpty(settings.Audio.Error)) { audio.Register(new Audio() { Url = string.Join("", System.AppDomain.CurrentDomain.BaseDirectory, settings.Audio.Error), Type = AudioEnum.Error }); } if (!string.IsNullOrEmpty(settings.Audio.Warning)) { audio.Register(new Audio() { Url = string.Join("", System.AppDomain.CurrentDomain.BaseDirectory, settings.Audio.Warning), Type = AudioEnum.Warning }); } ObjectPool.Instance.Register<IAudioService>().ImplementedBy(audio); }