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 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 void Execute <TProvider> (this IEasyCachingProviderDecorator <TProvider> decorator, Action <TProvider> action) where TProvider : class, IEasyCachingProviderBase { var provider = decorator.GetCachingProvider(); decorator.Execute(provider, action); }
protected DecoratedEasyCachingProviderBase( string name, IEasyCachingProviderDecorator <TProvider> decorator) { Name = name ?? throw new ArgumentNullException(nameof(name)); Decorator = decorator; }
public DecoratedHybridCachingProvider( string name, IEasyCachingProviderDecorator <IHybridCachingProvider> decorator) : base(name, decorator) { }