protected override void ReadElementValueEvent(object sender, ReadElementEventArgs eventArgs)
 {
     if (eventArgs.Path.Matches("opprettetDato", "registrering") &&
         Noark5TestHelper.TryParseArchiveDate(eventArgs.Value, out DateTime registrationCreatedTime))
     {
         _registrationCreationDates.Add(registrationCreatedTime);
     }
 }
예제 #2
0
        protected override void ReadElementValueEvent(object sender, ReadElementEventArgs eventArgs)
        {
            if (eventArgs.Path.Matches("systemID", "arkivdel"))
            {
                _currentArchivePart = new ArchivePart {
                    SystemId = eventArgs.Value
                };
                _archiveParts.Add(_currentArchivePart);
            }

            if (!eventArgs.Path.Matches("opprettetDato", "registrering"))
            {
                return;
            }

            if (Noark5TestHelper.TryParseArchiveDate(eventArgs.Value, out DateTime registrationCreatedTime))
            {
                _currentArchivePart.RegistrationCreationDates.Add(registrationCreatedTime);
            }
            else
            {
                _invalidRegistrationCreationDateCount++;
            }
        }