From f33a7db6fd98793fca17effaba41ea1fcbbcb1fa Mon Sep 17 00:00:00 2001 From: catcherwong Date: Mon, 13 Nov 2023 02:29:59 +0000 Subject: [PATCH] revert #487 Signed-off-by: catcherwong --- .../EasyCachingServiceCollectionExtensions.cs | 33 ------------------- 1 file changed, 33 deletions(-) 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; - } } }