public static IServiceClientCredentialsBuilder AddServiceClientCredentials(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action <ServiceClientCredentialsOptions> configure) { services.Configure(configure); services.AddSingleton <IServiceClientCredentialsDispatcherFactory, ServiceClientCredentialsDispatcherFactory>(); services.AddTransient <IServiceClientCredentialsConcreteFactory, OfaSchlupfer.SPO.SharePointOnlineServiceClientCredentialsFactory>(); return(new ServiceClientCredentialsBuilder(services)); }
public static IEntityBuilder AddOfaSchlupferEntity(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action <EntityOptions> configure) { services.Configure(configure); services.TryAddScoped <IEntityDispatcherFactory, EntityDispatcherFactory>(); //services.AddTransient<IHttpClientTypedFactory, HttpClientDefaultFactory>(); return(new EntityBuilder(services)); }
public static IODataRepositoryBuilder AddOfaSchlupferODataRepository(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action <ODataRepositoryOptions> configure) { services.Configure(configure); services.TryAddSingleton <OfaSchlupfer.Model.IExternalRepositoryModelType, ODataRepositoryModelType>(); services.TryAddTransient <ODataRepository, ODataRepositoryImplementation>(); services.TryAddTransient <CachedMetadataResolver, CachedMetadataResolver>(); return(new ODataRepositoryBuilder(services)); }
public static IModelBuilder AddOfaSchlupferModel(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action <EntityOptions> configure) { services.Configure(configure); //services.AddSingleton(typeof(IEntityDispatcherFactory), typeof(EntityDispatcherFactory)); services.TryAddScoped <ExternalRepositoryModelFactory>(); services.TryAddScoped <ModelRoot>(); services.AddTransient <ModelRepository>(); services.AddTransient <ModelDefinition>(); //services.AddTransient<CachedMetadataResolver>(); return(new EntityBuilder(services)); }