/// <summary> This constructor used when creating new lines to add to the file </summary> public Node(int indentation, ReadableDataFile file) { this.File = file ?? throw new ArgumentNullException("Nodes must belong to a file"); this.FileStyleRef = file as ReadableWritableDataFile; this.IndentationLevel = indentation; this.UnappliedStyle = true; }
public KeyNode(int indentation, string key, ReadableWritableDataFile file) : base(indentation, file) { if (!Utilities.IsValidKey(key, out string whyNot)) { throw new FormatException(whyNot); } RawText += key + ":"; }
/// <summary> This constructor used when loading lines from file </summary> public Node(string rawText, ReadableDataFile file) : base(rawText) { this.File = file ?? throw new ArgumentNullException("Nodes must belong to a file"); this.FileStyleRef = file as ReadableWritableDataFile; }
public ListNode(int indentation, ReadableWritableDataFile file) : base(indentation, file) { RawText += "-"; }
public ListNode(string rawText, ReadableWritableDataFile file) : base(rawText, file) { }
public MultiLineStringNode(string rawText, ReadableWritableDataFile file) : base(rawText, file) { }
public MultiLineStringNode(int indentation, ReadableWritableDataFile file) : base(indentation, file) { this.UnappliedStyle = false; // currently, no styles apply to MultiLineStringNodes }
/// <summary> This constructor used when creating new lines to add to the file </summary> public Node(int indentation, ReadableWritableDataFile file) { this.IndentationLevel = indentation; this.File = file; this.UnappliedStyle = true; }
/// <summary> This constructor used when loading lines from file </summary> public Node(string rawText, ReadableWritableDataFile file) : base(rawText) { this.File = file; }