public static void RegisterVueStorefrontBridgeDefaultService(this IServiceConfigurationProvider services, VsfApiBridgeConfiguration bridgeConfiguration) { services.AddSingleton(bridgeConfiguration); services.AddTransient <IUserEndpoint, UserEndpoint <VsfUser> >(); services.AddTransient <ICartEndpoint, CartEndpoint>(); services.AddTransient <IStockEndpoint, StockEndpoint>(); services.AddTransient <IOrderEndpoint, OrderEndpoint>(); services.AddScoped <QuicksilverDbContext>(); services.AddScoped <IRefreshTokenRepository, DatabaseRefreshTokenRepository>(); services.AddScoped <IUserTokenProvider, JwtUserTokenProvider>(); services.AddTransient <IUserClaimsProvider <VsfUser>, UserClaimsProvider <VsfUser> >(); }
public static void Add(this IServiceConfigurationProvider container, Dictionary <Type, Type> typeDictionary) { if (typeDictionary == null) { return; } foreach (var entry in typeDictionary) { container.AddScoped(entry.Key, entry.Value); } }
private static void ConfigureContainer(IServiceConfigurationProvider services) { services.AddSingleton <ICategoryContentLoader, DefaultCategoryContentLoader>(); services.AddSingleton <IContentInCategoryLocator, DefaultContentInCategoryLocator>(); services.AddScoped <ICategoryRouteHelper, DefaultCategoryRouteHelper>(); }
public void RegisterDependencies(IServiceConfigurationProvider services) { services.AddScoped <StartPageViewModelFactory>(); services.AddScoped <ArticlePageViewModeFactory>(); }