-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathJsonObjectCreationHandlingAttribute.xml
More file actions
92 lines (88 loc) · 7.49 KB
/
Copy pathJsonObjectCreationHandlingAttribute.xml
File metadata and controls
92 lines (88 loc) · 7.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<Type Name="JsonObjectCreationHandlingAttribute" FullName="System.Text.Json.Serialization.JsonObjectCreationHandlingAttribute">
<TypeSignature Language="C#" Value="public sealed class JsonObjectCreationHandlingAttribute : System.Text.Json.Serialization.JsonAttribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit JsonObjectCreationHandlingAttribute extends System.Text.Json.Serialization.JsonAttribute" />
<TypeSignature Language="DocId" Value="T:System.Text.Json.Serialization.JsonObjectCreationHandlingAttribute" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class JsonObjectCreationHandlingAttribute
Inherits JsonAttribute" />
<TypeSignature Language="F#" Value="type JsonObjectCreationHandlingAttribute = class
 inherit JsonAttribute" />
<TypeSignature Language="C++ CLI" Value="public ref class JsonObjectCreationHandlingAttribute sealed : System::Text::Json::Serialization::JsonAttribute" />
<AssemblyInfo>
<AssemblyName>System.Text.Json</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.1</AssemblyVersion>
<AssemblyVersion>10.0.0.2</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Text.Json.Serialization.JsonAttribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Property | System.AttributeTargets.Struct, AllowMultiple=false)]</AttributeName>
<AttributeName Language="F#">[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Property | System.AttributeTargets.Struct, AllowMultiple=false)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Determines how deserialization handles object creation for fields or properties.</summary>
<remarks>When placed on a field or property, this attribute indicates if the member will be replaced or populated.
When default resolvers are used, this attribute maps to <see cref="P:System.Text.Json.Serialization.Metadata.JsonPropertyInfo.ObjectCreationHandling" />.
When placed on a type with <see cref="F:System.Text.Json.Serialization.JsonObjectCreationHandling.Populate" />, this attribute indicates that all members that support population will be populated. When default resolvers are used, this attribute maps to <see cref="P:System.Text.Json.Serialization.Metadata.JsonTypeInfo.PreferredPropertyObjectCreationHandling" />.
The attribute corresponds only to the preferred values of creation handling for properties when placed on a type.
For example, when <see cref="T:System.Text.Json.Serialization.JsonObjectCreationHandlingAttribute" /> with <see cref="F:System.Text.Json.Serialization.JsonObjectCreationHandling.Populate" /> is placed on a class and a property is not capable of being populated, it will be replaced.
That might be <see langword="true" /> if, for example, the value type doesn't have a setter or the property is of type <see cref="T:System.Collections.Generic.IEnumerable`1" />.
Only the property type is taken into consideration. For example, if the property is of type <see cref="T:System.Collections.Generic.IEnumerable`1" /> has and has a run-time value of type <see cref="T:System.Collections.Generic.List`1" />, it won't be populated because <see cref="T:System.Collections.Generic.IEnumerable`1" /> is not capable of populating.
Value types require a setter to support population. In such cases, deserialization uses a copy of the property value, which will get assigned back to the setter once finished.</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public JsonObjectCreationHandlingAttribute (System.Text.Json.Serialization.JsonObjectCreationHandling handling);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(valuetype System.Text.Json.Serialization.JsonObjectCreationHandling handling) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Text.Json.Serialization.JsonObjectCreationHandlingAttribute.#ctor(System.Text.Json.Serialization.JsonObjectCreationHandling)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (handling As JsonObjectCreationHandling)" />
<MemberSignature Language="F#" Value="new System.Text.Json.Serialization.JsonObjectCreationHandlingAttribute : System.Text.Json.Serialization.JsonObjectCreationHandling -> System.Text.Json.Serialization.JsonObjectCreationHandlingAttribute" Usage="new System.Text.Json.Serialization.JsonObjectCreationHandlingAttribute handling" />
<MemberSignature Language="C++ CLI" Value="public:
 JsonObjectCreationHandlingAttribute(System::Text::Json::Serialization::JsonObjectCreationHandling handling);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Text.Json</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="handling" Type="System.Text.Json.Serialization.JsonObjectCreationHandling" />
</Parameters>
<Docs>
<param name="handling">The handling to apply to the current member.</param>
<summary>Initializes a new instance of <see cref="T:System.Text.Json.Serialization.JsonObjectCreationHandlingAttribute" />.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Handling">
<MemberSignature Language="C#" Value="public System.Text.Json.Serialization.JsonObjectCreationHandling Handling { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Text.Json.Serialization.JsonObjectCreationHandling Handling" />
<MemberSignature Language="DocId" Value="P:System.Text.Json.Serialization.JsonObjectCreationHandlingAttribute.Handling" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Handling As JsonObjectCreationHandling" />
<MemberSignature Language="F#" Value="member this.Handling : System.Text.Json.Serialization.JsonObjectCreationHandling" Usage="System.Text.Json.Serialization.JsonObjectCreationHandlingAttribute.Handling" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Text::Json::Serialization::JsonObjectCreationHandling Handling { System::Text::Json::Serialization::JsonObjectCreationHandling get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Text.Json</AssemblyName>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Text.Json.Serialization.JsonObjectCreationHandling</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the configuration to use when deserializing members.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>