Ejemplo n.º 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);
        }
Ejemplo n.º 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;
        }