> ## Documentation Index
> Fetch the complete documentation index at: https://easyaf.nimbleapps.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# XmlObjectInfoValues

> Provides serialization metadata about an object type with constructors, properties, and fields. This class cannot be inherited.

## Definition

**Assembly:** CloudNimble.XmlEssentials.dll

**Namespace:** CloudNimble.Text.Xml.Serialization

## Syntax

```csharp theme={"dark"}
CloudNimble.Text.Xml.Serialization.XmlObjectInfoValues<T>
```

## Summary

Provides serialization metadata about an object type with constructors, properties, and fields. This class
cannot be inherited.

## Remarks

Source-generated contexts create instances of this class and pass them to
[XmlMetadataServices.CreateObjectInfo](https://easyaf.nimbleapps.cloud/xmlessentials/api-reference/CloudNimble/Text/Xml/Serialization/XmlMetadataServices.md#createobjectinfo). It is analogous to `JsonObjectInfoValues<T>` in
`System.Text.Json`. The serializer reads and writes the type from this metadata with the rules it applies
to a type it maps through reflection, and with no reflection over the members of the type.

## Type Parameters

* `T` - The object type to serialize or deserialize.

## Constructors

### &#x20;.ctor

#### Syntax

```csharp theme={"dark"}
public XmlObjectInfoValues()
```

### &#x20;.ctor Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public Object()
```

## Properties

### &#x20;ConstructorParameterMetadataInitializer

Gets or initializes a method that returns the metadata of the parameters of the constructor that
[XmlObjectInfoValues\`1.ObjectWithParameterizedConstructorCreator](https://easyaf.nimbleapps.cloud/xmlessentials/api-reference/CloudNimble/Text/Xml/Serialization/XmlObjectInfoValues.md#objectwithparameterizedconstructorcreator) calls.

#### Syntax

```csharp theme={"dark"}
public System.Func<CloudNimble.Text.Xml.Serialization.XmlParameterInfoValues[]> ConstructorParameterMetadataInitializer { get; init; }
```

#### Property Value

Type: `System.Func<CloudNimble.Text.Xml.Serialization.XmlParameterInfoValues[]>?`
A method that returns one [XmlParameterInfoValues](https://easyaf.nimbleapps.cloud/xmlessentials/api-reference/CloudNimble/Text/Xml/Serialization/XmlParameterInfoValues.md) for each parameter, or
[`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when the type is not created through a constructor with parameters.

### &#x20;ObjectCreator

Gets or initializes a mechanism to create an instance of the type with no arguments.

#### Syntax

```csharp theme={"dark"}
public System.Func<T> ObjectCreator { get; init; }
```

#### Property Value

Type: `System.Func<T>?`
A method that creates the object, or [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when the type is created through
[XmlObjectInfoValues\`1.ObjectWithParameterizedConstructorCreator](https://easyaf.nimbleapps.cloud/xmlessentials/api-reference/CloudNimble/Text/Xml/Serialization/XmlObjectInfoValues.md#objectwithparameterizedconstructorcreator) or is never created, as an abstract class is not.

### &#x20;ObjectWithParameterizedConstructorCreator

Gets or initializes a mechanism to create an instance of the type through a constructor with parameters.

#### Syntax

```csharp theme={"dark"}
public System.Func<object[], T> ObjectWithParameterizedConstructorCreator { get; init; }
```

#### Property Value

Type: `System.Func<object?[], T>?`
A method that creates the object from an array that holds one argument for each parameter, in the order
of [XmlParameterInfoValues.Position](https://easyaf.nimbleapps.cloud/xmlessentials/api-reference/CloudNimble/Text/Xml/Serialization/XmlParameterInfoValues.md#position); or [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). The array may be longer than
the parameter list.

### &#x20;PropertyMetadataInitializer

Gets or initializes a method that returns the metadata of the properties and fields of the type.

#### Syntax

```csharp theme={"dark"}
public System.Func<CloudNimble.Text.Xml.XmlSerializerOptions, CloudNimble.Text.Xml.Serialization.XmlPropertyInfoValues[]> PropertyMetadataInitializer { get; init; }
```

#### Property Value

Type: `System.Func<CloudNimble.Text.Xml.XmlSerializerOptions, CloudNimble.Text.Xml.Serialization.XmlPropertyInfoValues[]>?`
A method that returns one [XmlPropertyInfoValues](https://easyaf.nimbleapps.cloud/xmlessentials/api-reference/CloudNimble/Text/Xml/Serialization/XmlPropertyInfoValues.md) for each property and field of the type and
its base types, in the order they are declared, base types first. The serializer leaves out the ones the
options and the attributes exclude; or [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when the type has no metadata, as in
[XmlSourceGenerationMode.Serialization](https://easyaf.nimbleapps.cloud/xmlessentials/api-reference/CloudNimble/Text/Xml/Serialization/XmlSourceGenerationMode.md).

### &#x20;SerializeHandler

Gets or initializes a method that writes the members of an object directly, without the metadata.

#### Syntax

```csharp theme={"dark"}
public System.Action<CloudNimble.Text.Xml.Utf8XmlWriter, T, CloudNimble.Text.Xml.XmlSerializerOptions> SerializeHandler { get; init; }
```

#### Property Value

Type: `System.Action<CloudNimble.Text.Xml.Utf8XmlWriter, T, CloudNimble.Text.Xml.XmlSerializerOptions>?`
A method that writes the attributes and the content of the element for a value, or [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null).
The start and end tags are written by the serializer.

#### Remarks

A source-generated context sets this only when [XmlMetadataServices.CanUseSerializeHandler](https://easyaf.nimbleapps.cloud/xmlessentials/api-reference/CloudNimble/Text/Xml/Serialization/XmlMetadataServices.md#canuseserializehandler)
says the options allow it. When it is set, the serializer writes through it. When
[XmlObjectInfoValues`1.PropertyMetadataInitializer](/xmlessentials/api-reference/CloudNimble/Text/Xml/Serialization/XmlObjectInfoValues#propertymetadatainitializer) is [`null\`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) as well, the type has no metadata: it can
be written through this method and cannot be read.

## Methods

### &#x20;Equals Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual bool Equals(object obj)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `obj` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;Equals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public static bool Equals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;GetHashCode Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual int GetHashCode()
```

#### Returns

Type: `int`

### &#x20;GetType Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public System.Type GetType()
```

#### Returns

Type: `System.Type`

### &#x20;MemberwiseClone Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
protected internal object MemberwiseClone()
```

#### Returns

Type: `object`

### &#x20;ReferenceEquals Inherited

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public static bool ReferenceEquals(object objA, object objB)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `objA` | `object?` | - |
| `objB` | `object?` | - |

#### Returns

Type: `bool`

### &#x20;ToString Inherited Virtual

> [!NOTE]
>
> Inherited from `object`

#### Syntax

```csharp theme={"dark"}
public virtual string ToString()
```

#### Returns

Type: `string?`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.