-Added Path to JsonReaderException, JsonSchemaException and ValidationEventArgs

-Fixed Path on JsonValidatingReader
-Fixed path queries over constructors
This commit is contained in:
James Newton-King
2012-02-25 16:44:07 +13:00
parent 0d6ad0b76e
commit fb2a5998bc
14 changed files with 142 additions and 47 deletions
+11 -11
View File
@@ -241,19 +241,10 @@ namespace Newtonsoft.Json
}
}
/// <summary>
/// Gets or sets the culture used when reading JSON. Defaults to <see cref="CultureInfo.InvariantCulture"/>.
/// </summary>
public CultureInfo Culture
{
get { return _culture ?? CultureInfo.InvariantCulture; }
set { _culture = value; }
}
/// <summary>
/// Gets the path of the current JSON token.
/// </summary>
public string Path
public virtual string Path
{
get
{
@@ -264,6 +255,15 @@ namespace Newtonsoft.Json
}
}
/// <summary>
/// Gets or sets the culture used when reading JSON. Defaults to <see cref="CultureInfo.InvariantCulture"/>.
/// </summary>
public CultureInfo Culture
{
get { return _culture ?? CultureInfo.InvariantCulture; }
set { _culture = value; }
}
/// <summary>
/// Initializes a new instance of the <see cref="JsonReader"/> class with the specified <see cref="TextReader"/>.
/// </summary>
@@ -596,7 +596,7 @@ namespace Newtonsoft.Json
linePosition = 0;
}
return new JsonReaderException(message, ex, lineNumber, linePosition);
return new JsonReaderException(message, ex, Path, lineNumber, linePosition);
}
internal static string FormatExceptionMessage(IJsonLineInfo lineInfo, string message)