/// <summary> /// Reads a rfid tag /// </summary> public void readSecureRFIDTags() { try { personHandler = fileHandler.ReadFile(); } catch (FileNotFoundException e) { if(personHandler == null) { personHandler = new PersonHandler(); } } }
private void readFIle() { try { personHandler = fileHandler.ReadFile(); } catch (FileNotFoundException e) { if (personHandler == null) { personHandler = new PersonHandler(); } } }
/// <summary> /// Writes a serializable class to a file /// </summary> /// <param name="securePersons"></param> public void WriteToFile(PersonHandler securePersons) { Logger.DebugLog("Updating file"); String json = JsonConvert.Serialize(securePersons); File.WriteAllText("RFID.Secure", json); }