3rdparty/NRefactory/ICSharpCode.NRefactory.Xml/TagReader.cs
/// <summary>
/// Read everything up to quote (excluding), opening/closing tag or attribute signature
/// </summary>
Read everything up to quote (excluding), opening/closing tag or attribute signature
Read everything up to quote ( excluding ) opening / closing tag or attribute signature
void ReadAttributeValue(char? quote)
		{
			while (HasMoreData()) {
				int start = this.CurrentLocation;
				TryMoveToNonWhiteSpace();  
				if (quote.HasValue) {
					if (TryPeek(quote.Value)) return;
				} else {
					if (TryPeek('"') || TryPeek('\'')) return;
				}
				string endBr;
				if (TryPeek('<') || TryReadClosingBracket(out endBr)) {
					GoBack(start);
					return;
				}
				if (TryReadName()) {
					int nameEnd = this.CurrentLocation;
					if (TryMoveToNonWhiteSpace() && TryRead("=") &&
					    TryMoveToNonWhiteSpace() && TryPeekAnyOf('"', '\''))
					{
						GoBack(start);
						return;  
					} else {
						GoBack(nameEnd);
						continue;  
					}
				}
				TryMoveNext(); 
			}
		}
void ReadAttributeValue ( char ? quote ) { while ( HasMoreData ( ) ) { int start = this . CurrentLocation ; TryMoveToNonWhiteSpace ( ) ; if ( quote . HasValue ) { if ( TryPeek ( quote . Value ) ) return ; } else { if ( TryPeek ( ' ' ) || TryPeek ( ' \' ' ) ) return ; } string endBr ; if ( TryPeek ( ' ' ) || TryReadClosingBracket ( out endBr ) ) { GoBack ( start ) ; return ; } if ( TryReadName ( ) ) { int nameEnd = this . CurrentLocation ; if ( TryMoveToNonWhiteSpace ( ) && TryRead ( " " ) && TryMoveToNonWhiteSpace ( ) && TryPeekAnyOf ( ' ' , ' \' ' ) ) { GoBack ( start ) ; return ; } else { GoBack ( nameEnd ) ; continue ; } } TryMoveNext ( ) ; } }
Read everything up to quote (excluding), opening/closing tag or attribute signature
Read everything up to quote ( excluding ) opening / closing tag or attribute signature
// What is next? // Read white space (if any) // Opening/closing tag // Try reading attribute signature // Start of attribute.  Great // Done // Just some gargabe - make it part of the value // Read more // Accept everyting else
quote
char?