Ejemplo n.º 1
0
 public RundownParameter([NotNull] string name, EParameterType type = EParameterType.TEXTBOX, string description = null)
 {
     Name        = name ?? throw new ArgumentNullException(nameof(name));
     DisplayName = name.Replace('.', ' ');
     Type        = type;
     Description = description;
 }
Ejemplo n.º 2
0
        public void AddParameter([NotNull] string name, string value = null, EParameterType type = EParameterType.TEXTBOX, string description = null)
        {
            RundownParameter current = Parameters.FirstOrDefault(x => x.Name == name);

            if (current != null)
            {
                throw new InvalidOperationException($"There is already a Parameter with the Name {name}");
            }

            RundownParameter parameter = string.IsNullOrEmpty(value)
                ? (new RundownParameter(name, type, description))
                : (new RundownParameter(name, value, type, description));

            Parameters.Add(parameter);
        }