Exemple #1
0
        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);
        }
Exemple #2
0
        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;
        }