예제 #1
0
 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,
     });
 }
예제 #2
0
 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);
 }