Esempio n. 1
0
 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> >();
 }
Esempio n. 2
0
 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);
     }
 }
Esempio n. 3
0
 private static void ConfigureContainer(IServiceConfigurationProvider services)
 {
     services.AddSingleton <ICategoryContentLoader, DefaultCategoryContentLoader>();
     services.AddSingleton <IContentInCategoryLocator, DefaultContentInCategoryLocator>();
     services.AddScoped <ICategoryRouteHelper, DefaultCategoryRouteHelper>();
 }
Esempio n. 4
0
 public void RegisterDependencies(IServiceConfigurationProvider services)
 {
     services.AddScoped <StartPageViewModelFactory>();
     services.AddScoped <ArticlePageViewModeFactory>();
 }