public static AllData ReadAll(ReaderDescriptor readerDescriptor, bool readRegistrationData = false) { using (var advancedReader = new AdvancedReader()) { advancedReader.SelectReader(readerDescriptor); advancedReader.ProcessNewCard(); var result = new AllData(); result.VehicleData = advancedReader.ReadVehicleData(); result.DocumentData = advancedReader.ReadDocumentData(); result.PersonalData = advancedReader.ReadPersonalData(); result.RegistrationData = new List<RegistrationData>(); if (readRegistrationData) { for (int i = 1; i <= 3; i++) { var registrationData = advancedReader.ReadRegistrationData(i); result.RegistrationData.Add(registrationData); } } return result; } }
public static List<ReaderDescriptor> GetAllReaders() { using (var advancedReader = new AdvancedReader()) return advancedReader.GetAllReaders(); }