public void AddAttribute(TypeValue type, string key, string displayName, string description, string[] options, IGenericFormSuggestionHandler suggestionHandler, object defaultValue) { if (Attributes.Any(k => k.Key == key)) { throw new Exception($"Parameter repeated: {key}"); } Attributes.Add(new GenericFormInputModel() { Key = key, Description = description, DisplayName = displayName, Type = type, Options = options, SuggestionHandler = suggestionHandler, DefaultValue = defaultValue, }); }
public void AddAttribute(TypeValue type, string key, string displayName, string description, IGenericFormSuggestionHandler suggestionHandler, object defaultValue = null) { AddAttribute(type, key, displayName, description, new string[] { }, suggestionHandler, defaultValue); }