public override List <IError> Validate(List <IError> errors) { RequireString(this, x => x.PartfieldID, 14, errors, "A"); ValidateString(this, x => x.PartfieldCode, 32, errors, "B"); RequireString(this, x => x.PartfieldDesignator, 32, errors, "C"); RequireRange <ISOPartfield, uint>(this, x => x.PartfieldArea, 0, uint.MaxValue - 2, errors, "D"); ValidateString(this, x => x.CustomerIdRef, 14, errors, "E"); ValidateString(this, x => x.FarmIdRef, 14, errors, "F"); ValidateString(this, x => x.CropTypeIdRef, 14, errors, "G"); ValidateString(this, x => x.CropVarietyIdRef, 14, errors, "H"); ValidateString(this, x => x.FieldIdRef, 14, errors, "I"); if (Polygons.Count > 0) { Polygons.ForEach(i => i.Validate(errors)); } if (LineStrings.Count > 0) { LineStrings.ForEach(i => i.Validate(errors)); } if (Points.Count > 0) { Points.ForEach(i => i.Validate(errors)); } if (GuidanceGroups.Count > 0) { GuidanceGroups.ForEach(i => i.Validate(errors)); } return(errors); }
protected bool Equals(GeoPolygon other) { return(base.Equals(other) && LineStrings.SequenceEqual(other.LineStrings)); }
public override Geometry Clone() { return(new Polygon(LineStrings.Select(x => x.Clone() as LineString))); }
public override int GetHashCode() { return(LineStrings.GetHashCode()); }