public void Read(string fileName) { if (string.IsNullOrEmpty(fileName)) { throw new ArgumentNullException("fileName"); } if (!File.Exists(fileName)) { throw new FileNotFoundException("Plot file not found", fileName); } try { FileName = Path.GetFileName(fileName); using (var inStream = new FileStream(fileName, FileMode.Open, FileAccess.Read)) { PiaSerializer.Deserialize(inStream, this); inStream.Close(); } } catch (Exception) { throw; } }
protected internal PiaNode(string innerData) { ChildNodes = new List <PiaNode>(); Values = new Dictionary <string, string>(); PiaSerializer._deserializeNode(this, innerData); }
public void Write(string fileName) { try { using (var outStream = new FileStream(fileName, FileMode.Create, FileAccess.Write)) { PiaSerializer.Serialize(outStream, this); outStream.Close(); } } catch (Exception) { throw; } }