コード例 #1
0
 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));
 }
コード例 #2
0
 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));
 }
コード例 #3
0
 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));
 }
コード例 #4
0
ファイル: ModelDI.cs プロジェクト: FlorianGrimm/OfaSchlupfer
        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));
        }