private void RegisterBuildConfig() { #if DEBUG _iocService.RegisterInstance <IBuildConfig>(BuildConfig.Debug); #else _iocService.RegisterInstance <IBuildConfig>(BuildConfig.Release); #endif }
public static IIocService AddDeviceServices(this IIocService iocService) { iocService.RegisterInstance <IRuntimePlatform>(RuntimePlatform.UWP); iocService.RegisterImplementation <IDeviceInfoService, UwpDeviceInfoService>(IocLifetime.Singleton); iocService.RegisterImplementation <IApplicationInfoService, ApplicationInfoService>(); iocService.RegisterImplementation <ISecureStorageService, SecureStorageService>(); return(iocService); }
private static void Register(IIocService iocService) { var httpClientFactory = (IHttpClientFactory) new ServiceCollection() .AddHttpClient() .BuildServiceProvider() .GetService(typeof(IHttpClientFactory)); iocService.RegisterInstance(httpClientFactory); iocService.RegisterImplementation <IHttpClientService, Service.HttpClientService>(IocLifetime.Singleton); iocService.RegisterImplementation <IHttpClientServiceConfig, DefaultHttpClientServiceConfig>(IocLifetime.Singleton); iocService.RegisterConsoleLoggerClientService(); }
public static IIocService AddDeviceServices(this IIocService iocService) { iocService.RegisterInstance <IRuntimePlatform>(RuntimePlatform.Android); iocService.RegisterImplementation <IDeviceInfoService, AndroidDeviceInfoService>(IocLifetime.Singleton); return(iocService); }