public static IContentsServiceBuilder AddContentsApi(this IContentsServiceBuilder services) { services.Services .AddMvcCore() .AddApplicationPart(typeof(ContentServiceDependencyInjectionExtensions).Assembly); return(services); }
public static IContentsServiceBuilder AddAzureMediaLibrary(this IContentsServiceBuilder services) { services.Services .AddMediatR(typeof(AzureMediaLibraryService)) .Configure <AzureMediaStorageOptions>(services.Configuration.GetSection(AzureMediaSectionName)) .AddScoped <IMediaLibraryProvider, AzureMediaLibraryService>() .AddScoped <AzureStorageClientFactory>() .AddScoped <AzureMediaLibraryQuery>() .AddScoped <AzureStorageRepository>() .AddScoped <MediaContentConverter>() .AddScoped <MediaFolderConverter>(); return(services); }
public static IContentsServiceBuilder AddContentfulModule(this IContentsServiceBuilder services) { services.Services .AddMediatR(typeof(ContentsService)) .AddAlaskaCommon() .Configure <ContentfulClientOptions>(services.Configuration.GetSection(ContentfulSectionName)) .AddSingleton <ContentfulClientsFactory>() .AddSingleton <FieldAdaptersCollection>() .AddScoped <ContentsConverter>() .AddScoped <ContentQueries>() .AddMemoryCacheInstance <ContentTypesCache>() .AddScoped <IContentsProvider, ContentsService>(); return(services); }
public static IContentsServiceBuilder AddMediaAuthorization <T>(this IContentsServiceBuilder services) where T : class, IMediaLibraryAuthorizationMiddleware { services.Services.AddScoped <IMediaLibraryAuthorizationMiddleware, T>(); return(services); }