private void LoadTemplateParameters(CommandTemplate template) { this.Parameters = new List <CommandParameter>(template.Parameters.Capacity); foreach (CommandParameterTemplate parameterTemplate in template.Parameters) { this.Parameters.Add(new CommandParameter(parameterTemplate)); } }
public Command(CommandTemplate template) { this.Template = template; LoadTemplateParameters(template); }
public Command(CommandTemplate template, List <CommandParameter> parameters) { this.Template = template; this.Parameters = parameters; }
public Command(int commandID, int byteLength, CommandType type) { Template = new CommandTemplate(commandID, byteLength, type); LoadTemplateParameters(Template); }