Beispiel #1
0
        public Boolean RemoveVariable(String variable, SubstitutionVariable.VariableType type = SubstitutionVariable.VariableType.Both)
        {
            SubstitutionVariable deleteMe = this.Variables.FirstOrDefault(v => v.Variable == variable && v.SubstitutionType == type);

            if (deleteMe != null)
            {
                return(this.Variables.Remove(deleteMe));
            }

            return(false);
        }
Beispiel #2
0
 public void AddVariable(String variable, String value, SubstitutionVariable.VariableType type = SubstitutionVariable.VariableType.Both)
 {
     if (!this.Variables.Contains(new SubstitutionVariable()
     {
         Variable = variable, Value = value, SubstitutionType = type
     }))
     {
         this.Variables.Add(new SubstitutionVariable()
         {
             Variable = variable, Value = value, SubstitutionType = type
         });
     }
 }