Beispiel #1
0
        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));
        }
Beispiel #2
0
        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));
        }
Beispiel #3
0
        public static void Execute <TProvider> (this IEasyCachingProviderDecorator <TProvider> decorator, Action <TProvider> action)
            where TProvider : class, IEasyCachingProviderBase
        {
            var provider = decorator.GetCachingProvider();

            decorator.Execute(provider, action);
        }