public VegSampleDTO(CompoundIdentity siteId, DateTime when, Point2 <double> location, float minElev, float maxElev) { MethodContract.Assert(!siteId.IsNullOrEmpty() || location != null, "siteId | location"); when = VegUtils.FixDate(when); MethodContract.Assert(DateTime.UtcNow >= when, nameof(when)); this.SiteId = siteId; this.When = when; this.Location = location; this.ElevationRange = VegUtils.Create(minElev, maxElev); }