-Documentation

This commit is contained in:
James Newton-King
2016-09-10 14:56:20 +12:00
parent fac72ad50c
commit 59618df631
2 changed files with 6 additions and 8 deletions
+4
View File
@@ -124,6 +124,10 @@
<para>The <codeEntityReference>T:Newtonsoft.Json.JsonExtensionDataAttribute</codeEntityReference> instructs the
<codeEntityReference>T:Newtonsoft.Json.JsonSerializer</codeEntityReference> to deserialize properties with no matching field or property
on the type into the specified collection. During serialization the values in this collection are written back to the instance's JSON object.</para>
<alert class="note">
<para>All extension data values will be written during serialization, even if a property the same name has already been written.</para>
</alert>
<para>This example shows the JsonExtensionDataAttribute being applied to a field, unmatched JSON properties being added to the field's collection during deserialization.</para>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Samples\Serializer\DeserializeExtensionData.cs" region="Types" title="Types" />
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Samples\Serializer\DeserializeExtensionData.cs" region="Usage" title="Usage" />
+2 -8
View File
@@ -706,10 +706,7 @@ namespace Newtonsoft.Json.Linq
/// <param name="propertyName">Name of the property.</param>
protected virtual void OnPropertyChanged(string propertyName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
#if !(PORTABLE40 || PORTABLE || NET20)
@@ -719,10 +716,7 @@ namespace Newtonsoft.Json.Linq
/// <param name="propertyName">Name of the property.</param>
protected virtual void OnPropertyChanging(string propertyName)
{
if (PropertyChanging != null)
{
PropertyChanging(this, new PropertyChangingEventArgs(propertyName));
}
PropertyChanging?.Invoke(this, new PropertyChangingEventArgs(propertyName));
}
#endif