Skip to content

Commit f33a7db

Browse files
committed
revert #487
Signed-off-by: catcherwong <[email protected]>
1 parent c627d78 commit f33a7db

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

src/EasyCaching.Core/Configurations/EasyCachingServiceCollectionExtensions.cs

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -30,38 +30,5 @@ public static IServiceCollection AddEasyCaching(this IServiceCollection services
3030

3131
return services;
3232
}
33-
34-
/// <summary>
35-
/// Adds the EasyCaching.
36-
/// </summary>
37-
/// <returns>The easy caching.</returns>
38-
/// <param name="services">Services.</param>
39-
/// <param name="setupAction">Setup action.</param>
40-
public static IServiceCollection AddEasyCaching(this IServiceCollection services, Action<IServiceProvider, EasyCachingOptions> setupAction)
41-
{
42-
ArgumentCheck.NotNull(setupAction, nameof(setupAction));
43-
44-
// Options
45-
services.AddSingleton(sp =>
46-
{
47-
var options = new EasyCachingOptions();
48-
setupAction(sp, options);
49-
return options;
50-
});
51-
52-
// Extension services
53-
services.AddSingleton(sp =>
54-
{
55-
var options = sp.GetRequiredService<EasyCachingOptions>();
56-
foreach (var serviceExtension in options.Extensions)
57-
{
58-
serviceExtension.AddServices(services);
59-
}
60-
61-
return options;
62-
});
63-
64-
return services;
65-
}
6633
}
6734
}

0 commit comments

Comments
 (0)