internal static void LoadIdentifierStatus() { IdentifierFile.LoadIdentifierState(); var oldData = IdentifierFile.identifierFile.identifiers; foreach (var val in oldData) { ReinsertIdentifierNames(val.id, val.name); ReinsertConnections(val.id, val.connectedIdentifiers); } }
/// <summary> /// Load from file /// </summary> /// <param name="ns"></param> /// <param name="fileName"></param> /// <param name="file"></param> /// <returns></returns> private bool TryLoadIdentifiers(Namespace ns, string fileName, out IdentifierFile file) { if (!File.Exists(fileName)) { file = null; return(false); } try { using (var stream = File.OpenRead(fileName)) { file = new IdentifierFile(stream, ns.Value, ns.Version); return(true); } } catch { file = null; return(false); } }
internal static void SaveIdentifierStatus() { IdentifierFile.SaveCurrentIdentifierState(); }