Exemple #1
0
        /// <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;
        }
Exemple #2
0
        public KeyNode(int indentation, string key, ReadableWritableDataFile file) : base(indentation, file)
        {
            if (!Utilities.IsValidKey(key, out string whyNot))
            {
                throw new FormatException(whyNot);
            }

            RawText += key + ":";
        }
Exemple #3
0
 /// <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;
 }
Exemple #4
0
 public ListNode(int indentation, ReadableWritableDataFile file) : base(indentation, file)
 {
     RawText += "-";
 }
Exemple #5
0
 public ListNode(string rawText, ReadableWritableDataFile file) : base(rawText, file)
 {
 }
Exemple #6
0
 public MultiLineStringNode(string rawText, ReadableWritableDataFile file) : base(rawText, file)
 {
 }
Exemple #7
0
 public MultiLineStringNode(int indentation, ReadableWritableDataFile file) : base(indentation, file)
 {
     this.UnappliedStyle = false; // currently, no styles apply to MultiLineStringNodes
 }
Exemple #8
0
 /// <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;
 }
Exemple #9
0
 /// <summary> This constructor used when loading lines from file </summary>
 public Node(string rawText, ReadableWritableDataFile file) : base(rawText)
 {
     this.File = file;
 }