Example #1
0
        public TemplateParameter(
            string name,
            string type,
            string datatype,
            TemplateParameterPriority priority = default,
            bool isName         = false,
            string?defaultValue = null,
            string?defaultIfOptionWithoutValue = null,
            string?description       = null,
            string?displayName       = null,
            bool allowMultipleValues = false,
            IReadOnlyDictionary <string, ParameterChoice>?choices = null)
        {
            Name         = name;
            Type         = type;
            DataType     = datatype;
            Priority     = priority;
            IsName       = isName;
            DefaultValue = defaultValue;
            DefaultIfOptionWithoutValue = defaultIfOptionWithoutValue;
            Description         = description;
            DisplayName         = displayName;
            AllowMultipleValues = allowMultipleValues;

            if (this.IsChoice())
            {
                Choices = choices ?? new Dictionary <string, ParameterChoice>();
            }
        }
 public Parameter(string name, TemplateParameterPriority priority, string type, bool isName = false, string documentation = null, string defaultValue = null)
 {
     Name          = name;
     Priority      = priority;
     Type          = type;
     IsName        = isName;
     Documentation = documentation;
     DefaultValue  = defaultValue;
 }