private string ReadString ()
{
bool flag = false;
char ch = '\0';
bool flag2 = true;
bool flag3 = false;
uint num = 0;
StringBuilder builder = new StringBuilder();
while (!this.IsAtEndOfInput) {
char currentChar = this.CurrentChar;
if (flag) {
builder.Append('\\');
builder.Append(currentChar);
flag = false;
goto Label_016E;
}
if (ch != '\0') {
if (currentChar == '\\') {
flag = true;
goto Label_016E;
}
if (currentChar != ch) {
builder.Append(currentChar);
goto Label_016E;
}
currentChar = this.CurrentChar;
ch = '\0';
break;
}
bool flag4 = false;
switch (currentChar) {
case '{':
num++;
builder.Append(currentChar);
goto Label_014C;
case '}':
if (num != 0) {
goto Label_0100;
}
flag4 = true;
goto Label_014C;
case '\\':
flag = true;
goto Label_014C;
case '=':
this._state = StringState.Property;
flag4 = true;
goto Label_014C;
case ' ':
if (this._state != StringState.Type) {
break;
}
flag4 = true;
goto Label_014C;
case '"':
case '\'':
if (!flag2) {
throw new XamlParseException(this, SR.Get("QuoteCharactersOutOfPlace"));
}
ch = currentChar;
flag3 = true;
goto Label_014C;
case ',':
flag4 = true;
goto Label_014C;
default:
builder.Append(currentChar);
goto Label_014C;
}
builder.Append(currentChar);
goto Label_014C;
Label_0100:
num--;
builder.Append(currentChar);
Label_014C:
if (flag4) {
if (num > 0) {
throw new XamlParseException(this, SR.Get("UnexpectedTokenAfterME"));
}
this.PushBack();
break;
}
Label_016E:
flag2 = false;
this.Advance();
}
if (ch != '\0') {
throw new XamlParseException(this, SR.Get("UnclosedQuote"));
}
string str = builder.ToString();
if (!flag3) {
str = str.TrimEnd(KnownStrings.WhitespaceChars).TrimStart(KnownStrings.WhitespaceChars);
}
return str;
}