public FieldBinding(Field field) { if (field == null) throw new ArgumentNullException("field"); _field = field; _items = new[] {this}; _field.Name = NotEmpty(_field.Name); }
private void Set(string key, bool isProtected) { Field field; if (!_fields.TryGetValue(key, out field)) { field = new Field { Name = key, }; _fields.Add(key, field); } field.Protected = isProtected; }
public void DeleteField(Field field) { if (field == null) throw new ArgumentNullException("field"); if (_known.Any(n => n == field.Name)) throw new ArgumentException("Reserved Field"); }
public void Add(Field field) { if (field == null) throw new ArgumentNullException("field"); if (_fields.Values.Count(p => p.Equals(field)) > 1) throw new ArgumentException("Duplicate Exception", string.Format("duplicate found for {0}", field.Name)); if (!_fields.Values.Contains(field)) _fields.AddOrSet(field.Name, field); }
public Field AddField() { var field = new Field(); _addedFields.Add(field); return field; }
public void Add(Field field) { if (field == null) throw new ArgumentNullException("field"); _fields.AddOrSet(field.Name, field); }