Exemplo n.º 1
0
        public static ControllerActionMap GetActionMap(Type controllerType)
        {
            Debug.Assert(typeof(Controller).IsAssignableFrom(controllerType));

            lock ( _sCache )
            {
                ControllerActionMap map;
                if (_sCache.TryGetValue(controllerType, out map))
                {
                    return(map);
                }

                map = new ControllerActionMap(controllerType);
                _sCache.Add(controllerType, map);
                return(map);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Base constructor for <see cref="Controller"/>.
 /// </summary>
 protected Controller()
 {
     ActionMap = ControllerActionMap.GetActionMap(GetType());
 }