public static IServiceCollection AddBigQuerySchemaHelper(this IServiceCollection services, IConfigurationSection configurationSection, string optionsName) { var helperOptions = new BigQuerySchemaHelperOptions(); configurationSection.Bind(helperOptions); return(services.AddBigQuerySchemaHelper(helperOptions, optionsName)); }
public static IServiceCollection AddBigQuerySchemaHelper(this IServiceCollection services, BigQuerySchemaHelperOptions helperOptions, string optionsName) { services.Configure <BigQuerySchemaHelperOptions>(optionsName, options => { options.ProjectId = helperOptions.ProjectId; options.DatasetName = helperOptions.DatasetName; options.TeamId = helperOptions.TeamId; options.AppId = helperOptions.AppId; }); services.AddSingleton <IBigQueryClientFactory, BigQueryClientFactory>(); services.AddScoped <IBigQuerySchemaHelper, BigQuerySchemaHelper>(); return(services); }
public static IServiceCollection AddBigQuerySchemaHelper(this IServiceCollection services, BigQuerySchemaHelperOptions helperOptions) { return(services.AddBigQuerySchemaHelper(helperOptions, "")); }