/// <summary> /// Add singleton view model type to service registry. /// </summary> /// <typeparam name="T">view model type</typeparam> /// <param name="serviceRegistry">service registry</param> /// <returns>service registry</returns> public static IServiceRegistry AddViewModelSingleton <T>(this IServiceRegistry serviceRegistry) where T : BaseViewModel { return(serviceRegistry.AddSingleton <T>()); }
/// <summary> /// Add the event service to the service registry. /// </summary> /// <param name="serviceRegistry"></param> /// <returns></returns> public static IServiceRegistry AddEventService(this IServiceRegistry serviceRegistry) { serviceRegistry.AddSingleton <IEventService, EventService>(); return(serviceRegistry); }
/// <summary> /// Register service as a singleton. /// </summary> /// <typeparam name="TService">service type</typeparam> /// <returns>service registry</returns> public IServiceRegistry AddSingleton <TService>() where TService : class { return(_serviceRegistry.AddSingleton <TService>()); }
/// <summary> /// Add the property service to the service registry. /// </summary> /// <param name="serviceRegistry"></param> /// <returns></returns> public static IServiceRegistry AddDictionaryService(this IServiceRegistry serviceRegistry) { serviceRegistry.AddSingleton <IDictionaryService>(x => DictionaryService.Current); return(serviceRegistry); }
public void Configure(IServiceRegistry registry) { registry.AddSingleton <IAudioService, AudioService>(); }