-Added ReadAsInt32 to JsonReader

-Improved performance by using an enum rather than a type check to test contract type
This commit is contained in:
JamesNK
2012-01-22 01:51:01 +00:00
parent cd424a7bc5
commit 58d51cda5c
24 changed files with 398 additions and 238 deletions
@@ -96,7 +96,7 @@ namespace Newtonsoft.Json.Converters
while (reader.TokenType == JsonToken.PropertyName)
{
string columnName = (string) reader.Value;
string columnName = (string)reader.Value;
reader.Read();
@@ -93,7 +93,7 @@ namespace Newtonsoft.Json.Converters
private object ReadBson(BsonReader reader)
{
string regexText = (string) reader.Value;
string regexText = (string)reader.Value;
int patternOptionDelimiterIndex = regexText.LastIndexOf('/');
string patternText = regexText.Substring(1, patternOptionDelimiterIndex - 1);
@@ -126,7 +126,7 @@ namespace Newtonsoft.Json.Converters
{
reader.Read();
reader.Read();
string pattern = (string) reader.Value;
string pattern = (string)reader.Value;
reader.Read();
reader.Read();