/// <summary> /// Create. /// </summary> /// <param name="parent">The strong-type type descriptor.</param> /// <param name="container">The instance which defines the parameters.</param> internal ActionExecutionTypeDescriptor( ICustomTypeDescriptor parent, Models.ActionExecutionModel container) : base(parent) { properties = AugmentPropertiesWithParameters(parent.GetProperties(), container.GetParameterSpecifications()); }
private object GetParameterValue(Models.ActionExecutionModel model, ParameterSpecification parameterSpecification) { if (model.Parameters.TryGetValue(parameterSpecification.Key, out object value)) { return(value); } else { return(parameterSpecification.GetDefaultValue()); } }
/// <summary> /// Create. /// </summary> /// <param name="container"> /// The container of the <see cref="Models.ActionExecutionModel.Parameters"/> /// used to augment the type descriptor. /// </param> public ActionExecutionModelValidationProvider(Models.ActionExecutionModel container) { this.Container = container; }