Пример #1
0
 private ICacheKeySource GetKeyFromSource(ControllerContext filterContext)
 {
     ICacheKeySource source;
     switch (_source)
     {
         case CacheKeySource.Request:
             source = new RequestCacheKeySource(filterContext.RequestContext);
             break;
         default:
             throw new ArgumentOutOfRangeException();
     }
     return source;
 }
Пример #2
0
        private ICacheKeySource GetKeyFromSource(ControllerContext filterContext)
        {
            ICacheKeySource source;

            switch (_source)
            {
            case CacheKeySource.Request:
                source = new RequestCacheKeySource(filterContext.RequestContext);
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
            return(source);
        }