private VmtValueNode ParseValue(IEnumerator <string> tokens, string name) { VmtValueNode node = new VmtValueNode(); node.Name = name; node.Value = tokens.Current; if (!tokens.MoveNext()) { throw new System.IO.InvalidDataException("Expected node value or new line."); } while (tokens.Current != Environment.NewLine) { node.Value += " " + tokens.Current; if (!tokens.MoveNext()) { throw new System.IO.InvalidDataException("Expected node value or new line."); } } return(node); }
private VmtValueNode ParseValue(IEnumerator<string> tokens, string name) { VmtValueNode node = new VmtValueNode(); node.Name = name; node.Value = tokens.Current; if (!tokens.MoveNext()) throw new System.IO.InvalidDataException("Expected node value or new line."); while (tokens.Current != Environment.NewLine) { node.Value += " " + tokens.Current; if (!tokens.MoveNext()) throw new System.IO.InvalidDataException("Expected node value or new line."); } return node; }