Beispiel #1
0
        public FieldVisitInfo AddFieldVisit(LocationInfo location, FieldVisitDetails fieldVisitDetails)
        {
            var fieldVisitInfo = InternalConstructor <FieldVisitInfo> .Invoke(location, fieldVisitDetails);

            AppendedResults.AppendedVisits.Add(fieldVisitInfo);

            return(fieldVisitInfo);
        }
Beispiel #2
0
        private LocationInfo CreateDummyLocationInfo(string identifier, string name, Guid uniqueId)
        {
            const long dummyLocationId = 0;

            var locationInfo = InternalConstructor <LocationInfo> .Invoke(
                name,
                identifier,
                dummyLocationId,
                uniqueId,
                UtcOffset.TotalHours);

            if (KnownLocations.Any(l => l.LocationIdentifier == identifier))
            {
                throw new ArgumentException($"Can't add duplicate location for Identifier='{identifier}'");
            }

            KnownLocations.Add(locationInfo);

            return(locationInfo);
        }