-Added ItemIsReference, ItemReferenceLoopHandling, ItemTypeNameHandling, ItemConverterType to JsonPropertyAttribute

This commit is contained in:
James Newton-King
2012-05-05 20:30:02 +12:00
parent 0e22f39e12
commit 2dfd0bc940
14 changed files with 1284 additions and 630 deletions
+26 -5
View File
@@ -43,12 +43,15 @@ namespace Newtonsoft.Json
internal bool? _isReference;
internal int? _order;
internal Required? _required;
internal bool? _itemIsReference;
internal ReferenceLoopHandling? _itemReferenceLoopHandling;
internal TypeNameHandling? _itemTypeNameHandling;
///// <summary>
///// Gets the collection's items converter.
///// </summary>
///// <value>The collection's items converter.</value>
//public Type ItemConverterType { get; set; }
/// <summary>
/// Gets the collection's items converter.
/// </summary>
/// <value>The collection's items converter.</value>
public Type ItemConverterType { get; set; }
/// <summary>
/// Gets or sets the null value handling used when serializing this property.
@@ -138,6 +141,24 @@ namespace Newtonsoft.Json
/// <value>The name of the property.</value>
public string PropertyName { get; set; }
public ReferenceLoopHandling ItemReferenceLoopHandling
{
get { return _itemReferenceLoopHandling ?? default(ReferenceLoopHandling); }
set { _itemReferenceLoopHandling = value; }
}
public TypeNameHandling ItemTypeNameHandling
{
get { return _itemTypeNameHandling ?? default(TypeNameHandling); }
set { _itemTypeNameHandling = value; }
}
public bool ItemIsReference
{
get { return _itemIsReference ?? default(bool); }
set { _itemIsReference = value; }
}
/// <summary>
/// Initializes a new instance of the <see cref="JsonPropertyAttribute"/> class.
/// </summary>