public static T Execute <TProvider, T>(this IEasyCachingProviderDecorator <TProvider> decorator, Func <TProvider, T> function) where TProvider : class, IEasyCachingProviderBase { var provider = decorator.GetCachingProvider(); return(decorator.Execute(provider, function)); }
public static async Task <T> ExecuteAsync <TProvider, T>(this IEasyCachingProviderDecorator <TProvider> decorator, Func <TProvider, Task <T> > function) where TProvider : class, IEasyCachingProviderBase { var provider = decorator.GetCachingProvider(); return(await decorator.ExecuteAsync(provider, function)); }
public static void Execute <TProvider> (this IEasyCachingProviderDecorator <TProvider> decorator, Action <TProvider> action) where TProvider : class, IEasyCachingProviderBase { var provider = decorator.GetCachingProvider(); decorator.Execute(provider, action); }