导航

10- ActionDescriptor

Posted on 2015-04-16 14:19  DotNet1010  阅读(156)  评论(0)    收藏  举报

--

 public class ActionDescriptor
    {
        public ActionDescriptor()
        {
            Properties = new Dictionary<object, object>();
			//不区分大小写
            RouteValueDefaults = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);
        }

        public virtual string Name { get; set; }

		/// <summary>
		///RouteDataActionConstraint 三个属性 { Key Value KeyHandling }
		/// </summary>
		public List<RouteDataActionConstraint> RouteConstraints { get; set; }
		/// <summary>
		///  AttributeRouteInfo 三个属性 {Template Order Name}
		/// </summary>
		public AttributeRouteInfo AttributeRouteInfo { get; set; }

        public Dictionary<string, object> RouteValueDefaults { get; private set; }

        /// <summary>
        /// The set of constraints for this action. Must all be satisfied for the action to be selected.
		///  该接口是标记接口(空接口)
        /// </summary>
        public List<IActionConstraintMetadata> ActionConstraints { get; set; }

		/// <summary>
		///  ParameterDescriptor 三个属性 {Name ParameterType BinderMetadata }
		/// </summary>
		public List<ParameterDescriptor> Parameters { get; set; }
		/// <summary>
		///  FilterDescriptor 三个属性 {Filter  Order Scope}
		/// </summary>
		public List<FilterDescriptor> FilterDescriptors { get; set; }

        /// <summary>
        /// A friendly name for this action.
        /// </summary>
        public virtual string DisplayName { get; set; }

        /// <summary>
        /// Stores arbitrary metadata properties associated with the <see cref="ActionDescriptor"/>.
        /// </summary>
        public IDictionary<object, object> Properties { get; private set; }
    }