Example #1
0
        private void InitializeItem(string routeName, Type type, MethodInfo m, RouteSettingAttribute attribute)
        {
            routeName = routeName.ToLower();
            CacheRouteInfo routeInfo;

            if (TryGetQueryCache(routeName, out routeInfo))
            {
                return;
            }
            routeInfo = InitializeCacheRouteInfo(routeName, type, m, attribute);
            SetQueryCache(routeName, routeInfo);
        }
Example #2
0
        private CacheRouteInfo InitializeCacheRouteInfo(string name, Type c, MethodInfo m, RouteSettingAttribute attribute)
        {
            CacheRouteInfo routeInfo = new CacheRouteInfo()
            {
                Key         = name,
                ClassType   = c,
                Method      = m,
                Parameters  = null,
                ParamReader = null,
                RightsName  = attribute == null ? string.Empty : attribute.RightsName,
                RouteFlags  = attribute == null ? RouteFlags.Default : attribute.RouteFlags,
                Description = attribute == null ? string.Empty : attribute.Description,
            };

            return(routeInfo);
        }