/// <summary> /// Registers the type mappings with the Unity container. /// </summary> /// <param name="container">The unity container to configure.</param> /// <remarks> /// There is no need to register concrete types such as controllers or /// API controllers (unless you want to change the defaults), as Unity /// allows resolving a concrete type even if it was not previously /// registered. /// </remarks> public static void RegisterTypes(IUnityContainer container) { // NOTE: To load from web.config uncomment the line below. // Make sure to add a Unity.Configuration to the using statements. // container.LoadConfiguration(); // TODO: Register your type's mappings here. // container.RegisterType<IProductRepository, ProductRepository>(); container.AddMvcCompat(); container.AddScoped <DisposeTracker>(); container.AddTransient <DisposeTracker2>(); }
public static IUnityContainer WithLetsEncryptService(this IUnityContainer container, LetsEncryptServiceOptions options) { container.RegisterInstance(options); container.AddScoped <IRS256SignerStore, SignersStore>(); // container.AddScoped<IRS256SignerService, DefaultRS256SignerService>(); container.AddScoped <IAcmeClientService <AcmeContext>, CertesAcmeClientService>(); container.AddScoped <IAcmeRegistrationStore, InMemoryAcmeRegistrationStore>(); container.AddScoped <ILetsEncryptChallengeService <AcmeContext>, CertesChallengeService>(); container.AddScoped <ICloudFlareZoneService, CloudFlareZoneServiceWrapper>(); container.AddScoped <IOrdersService, OrdersServicesWrapper>(); container.AddScoped <IDnsClient, CloudFlareDNSClient>(); // container.AddScoped<DnsMadeEasyClientCredetials, DnsMadeEasyOptions>(); container.AddScoped <LetsEncryptService <AcmeClient> >(); return(container); }