/// <summary> /// Initializes a new instance of the <see cref="ActionWithParametersViewModelBase"/> class. /// </summary> /// <param name="action">The action.</param> /// <param name="actionDescription">The action description.</param> /// <param name="parameterDescriptions">The parameter descriptions.</param> /// <param name="allDescriptions">All descriptions.</param> protected ActionWithParametersViewModelBase([NotNull] ActionWithParameters action, [NotNull] ActionDescription actionDescription, [NotNull] IEnumerable <ParameterDescription> parameterDescriptions, [NotNull] IEnumerable <ActionDescription> allDescriptions) : base(action, actionDescription, allDescriptions) { Assert.ArgumentNotNull(action, "action"); Assert.ArgumentNotNull(actionDescription, "actionDescription"); Assert.ArgumentNotNull(parameterDescriptions, "parameterDescriptions"); Assert.ArgumentNotNull(allDescriptions, "allDescriptions"); ParametersModel = new ActionParametersViewModel(action.Parameters, parameterDescriptions); }
public ActionParametersViewModel Clone([NotNull] IList <ActionParameterBase> parameters) { Assert.ArgumentNotNull(parameters, "parameters"); var res = new ActionParametersViewModel(parameters, ParameterDescriptions); foreach (var actionParameterViewModelBase in Parameters) { res.AddParameter(actionParameterViewModelBase.Clone()); } return(res); }