diff --git a/src/EasyCaching.Core/Configurations/EasyCachingServiceCollectionExtensions.cs b/src/EasyCaching.Core/Configurations/EasyCachingServiceCollectionExtensions.cs index 2873dad9..2d623805 100644 --- a/src/EasyCaching.Core/Configurations/EasyCachingServiceCollectionExtensions.cs +++ b/src/EasyCaching.Core/Configurations/EasyCachingServiceCollectionExtensions.cs @@ -30,38 +30,5 @@ public static IServiceCollection AddEasyCaching(this IServiceCollection services return services; } - - /// - /// Adds the EasyCaching. - /// - /// The easy caching. - /// Services. - /// Setup action. - public static IServiceCollection AddEasyCaching(this IServiceCollection services, Action setupAction) - { - ArgumentCheck.NotNull(setupAction, nameof(setupAction)); - - // Options - services.AddSingleton(sp => - { - var options = new EasyCachingOptions(); - setupAction(sp, options); - return options; - }); - - // Extension services - services.AddSingleton(sp => - { - var options = sp.GetRequiredService(); - foreach (var serviceExtension in options.Extensions) - { - serviceExtension.AddServices(services); - } - - return options; - }); - - return services; - } } }