public XSetInt64(string path) { string contents; using (var reader = new StreamReader(path)) { contents = reader.ReadToEnd(); } var node = new XSetInt64Node(contents); var items = node.GetProperties <long>(L); foreach (var l in items) { _set.Add(l); } }
public void SaveTo(string path) { var directory = Path.GetDirectoryName(path); Debug.Assert(null != directory); if (string.Empty != directory) { Directory.CreateDirectory(directory); } lock (this) { var node = new XSetInt64Node(); node.SetProperties(L, _set.ToArray()); using (var writer = new StreamWriter(path)) { writer.WriteLine(node.ToString()); } } }