GetRemainingStringValue() публичный Метод

public GetRemainingStringValue ( int position ) : string
position int
Результат string
        static bool TryParseElement(Lexer lexer, out AuthenticationHeaderValue parsedValue, out Token t)
        {
            t = lexer.Scan();
            if (t != Token.Type.Token)
            {
                parsedValue = null;
                return(false);
            }

            parsedValue        = new AuthenticationHeaderValue();
            parsedValue.Scheme = lexer.GetStringValue(t);

            t = lexer.Scan();
            if (t == Token.Type.Token)
            {
                // TODO: Wrong with multi value parsing
                parsedValue.Parameter = lexer.GetRemainingStringValue(t.StartPosition);
                t = new Token(Token.Type.End, 0, 0);
            }

            return(true);
        }
Пример #2
0
		static bool TryParseElement (Lexer lexer, out AuthenticationHeaderValue parsedValue, out Token t)
		{
			t = lexer.Scan ();
			if (t != Token.Type.Token) {
				parsedValue = null;
				return false;
			}

			parsedValue = new AuthenticationHeaderValue ();
			parsedValue.Scheme = lexer.GetStringValue (t);

			t = lexer.Scan ();
			if (t == Token.Type.Token) {
				// TODO: Wrong with multi value parsing
				parsedValue.Parameter = lexer.GetRemainingStringValue (t.StartPosition);
				t = new Token (Token.Type.End, 0, 0);
			}

			return true;
		}