Skip to main content

Definition

Assembly: CloudNimble.XmlEssentials.dll Namespace: CloudNimble.Text.Xml.Serialization Inheritance: CloudNimble.Text.Xml.Serialization.XmlPropertyInfoValues

Syntax

Summary

Provides serialization metadata about a property or field. This class cannot be inherited.

Remarks

Source-generated contexts create instances of this class. It is analogous to JsonPropertyInfoValues<T> in System.Text.Json. The names, the ignore conditions and the mapping of the member are not given here: the serializer works them out from XmlPropertyInfoValues`1.Attributes and the options, exactly as it does for a member it finds through reflection.

Type Parameters

  • TValue - The type of the property or field.

Constructors

.ctor

Syntax

.ctor Inherited

Inherited from CloudNimble.Text.Xml.Serialization.XmlPropertyInfoValues
Initializes a new instance of the XmlPropertyInfoValues class.

Syntax

Remarks

Only XmlPropertyInfoValues1` derives from this class: a class outside this library cannot.

.ctor Inherited

Inherited from object

Syntax

Properties

Attributes

Gets or initializes the XmlEssentials attributes on the member.

Syntax

Property Value

Type: System.Attribute[]? The attributes, as instances constructed with the arguments the member declares them with; or null when the member has none.

Remarks

The serializer reads these as it reads the attributes it finds through reflection.

DeclaringType

Gets or initializes the type that declares the member.

Syntax

Property Value

Type: System.Type The declaring type.

Getter

Gets or initializes a method that gets the value of the member.

Syntax

Property Value

Type: System.Func<object, TValue>? A method that takes the object, boxed when it is a value type, and returns the value of the member; or null when the member cannot be read.

IsGetNullable

Gets or initializes a value that indicates whether the member may return null.

Syntax

Property Value

Type: bool true if the nullable annotations of the member allow it to return null, or say nothing; otherwise, false.

Remarks

The value is read when XmlSerializerOptions.RespectNullableAnnotations is true.

IsProperty

Gets or initializes a value that indicates whether the member is a property or a field.

Syntax

Property Value

Type: bool true for a property; false for a field.

IsPublic

Gets or initializes a value that indicates whether the member is public.

Syntax

Property Value

Type: bool true if the field, or the get accessor of the property, is public; otherwise, false. A member that is not public is serialized only when it has XmlIncludeAttribute.

IsRequired

Gets or initializes a value that indicates whether the member is declared with the required modifier.

Syntax

Property Value

Type: bool true if the member has the required modifier; otherwise, false.

IsSetNullable

Gets or initializes a value that indicates whether the member accepts null.

Syntax

Property Value

Type: bool true if the nullable annotations of the member allow it to be set to null, or say nothing; otherwise, false.

Remarks

The value is read when XmlSerializerOptions.RespectNullableAnnotations is true.

IsVirtual

Gets or initializes a value that indicates whether the member is a property with a virtual accessor.

Syntax

Property Value

Type: bool true if the property is virtual, abstract, an override, or implements an interface member; otherwise, false. The default is false.

Remarks

A property that overrides another is the same member, so only the most derived one is serialized. When that one is ignored, the property it overrides is not serialized either.

PropertyName

Gets or initializes the name of the property or field as it is declared.

Syntax

Property Value

Type: string The C# name of the member.

Setter

Gets or initializes a method that sets the value of the member.

Syntax

Property Value

Type: System.Action<object, TValue>? A method that takes the object, boxed when it is a value type, and the value to set; or null when the member cannot be set after the object is created.

Methods

CreateFacts Inherited Abstract

Inherited from CloudNimble.Text.Xml.Serialization.XmlPropertyInfoValues
Turns the values into the facts the object binder works from.

Syntax

Returns

Type: CloudNimble.Text.Xml.Serialization.XmlMemberFacts The facts of the member.

Equals Inherited Virtual

Inherited from object

Syntax

Parameters

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

Returns

Type: string?