Exemplo n.º 1
0
 public void AddFieldToUpdate(string fieldName)
 {
     if (Values.Where((x) => x.FieldName.Equals(fieldName)).Count() > 0)
     {
         FieldsToUpdate.Add(fieldName);
     }
     else
     {
         throw new Exception(message: "This field is not in the values");
     }
 }
Exemplo n.º 2
0
        public void AddValue(string fieldName, object value, bool toUpdate)
        {
            if (Values.Where((v) => v.FieldName.Equals(fieldName)).Count() > 0)
            {
                throw new Exception(string.Format(format: "This field is already on values: {0} .",
                                                  arg0: fieldName));
            }

            AddValue(fieldName, value);
            if (toUpdate)
            {
                FieldsToUpdate.Add(fieldName);
            }
        }