コード例 #1
0
        public static IServiceCollection AddAliClient(this IServiceCollection services, Action <AliSettingsProvider> provider)
        {
            var defaults = new AliSettingsProvider();

            provider.Invoke(defaults);
            services.AddSingleton <IAliApiClient>(client => new AliApiClient(defaults));
            return(services);
        }
コード例 #2
0
 public AliApiClient(AliSettingsProvider settingsProvider)
 {
     _settings = settingsProvider;
 }