Table of Contents

Class TypeInfoMappingHelpers

Namespace
Npgsql.Internal
Assembly
Npgsql.dll
public static class TypeInfoMappingHelpers
Inheritance
TypeInfoMappingHelpers
Inherited Members

Methods

CreateInfo(TypeInfoMapping, PgSerializerOptions, PgConverter)

Creates a PgTypeInfo from a mapping, optins, and a converter.

public static PgTypeInfo CreateInfo(this TypeInfoMapping mapping, PgSerializerOptions options, PgConverter converter)

Parameters

mapping TypeInfoMapping

The mapping to create an info for.

options PgSerializerOptions

The options to use.

converter PgConverter

The converter to create a PgTypeInfo for.

Returns

PgTypeInfo

The created info instance.

CreateInfo(TypeInfoMapping, PgSerializerOptions, PgConverter, DataFormat?, bool)

Creates a PgTypeInfo from a mapping, options, and a converter.

public static PgTypeInfo CreateInfo(this TypeInfoMapping mapping, PgSerializerOptions options, PgConverter converter, DataFormat? preferredFormat = null, bool supportsWriting = true)

Parameters

mapping TypeInfoMapping

The mapping to create an info for.

options PgSerializerOptions

The options to use.

converter PgConverter

The converter to create a PgTypeInfo for.

preferredFormat DataFormat?

Whether to prefer a specific data format for this info, when null it defaults to the most suitable format.

supportsWriting bool

Whether the converters returned from the given converter resolver support writing.

Returns

PgTypeInfo

The created info instance.

CreateInfo(TypeInfoMapping, PgSerializerOptions, PgConverterResolver, bool)

Creates a PgResolverTypeInfo from a mapping, options, and a converter resolver.

public static PgResolverTypeInfo CreateInfo(this TypeInfoMapping mapping, PgSerializerOptions options, PgConverterResolver resolver, bool includeDataTypeName)

Parameters

mapping TypeInfoMapping

The mapping to create an info for.

options PgSerializerOptions

The options to use.

resolver PgConverterResolver

The resolver to create a PgResolverTypeInfo for.

includeDataTypeName bool

Whether to pass mapping.DataTypeName to the PgResolverTypeInfo constructor, mandatory when TypeInfoFactory(..., requiresDataTypeName: true).

Returns

PgResolverTypeInfo

The created info instance.

CreateInfo(TypeInfoMapping, PgSerializerOptions, PgConverterResolver, bool, DataFormat?, bool)

Creates a PgResolverTypeInfo from a mapping, options, and a converter resolver.

public static PgResolverTypeInfo CreateInfo(this TypeInfoMapping mapping, PgSerializerOptions options, PgConverterResolver resolver, bool includeDataTypeName, DataFormat? preferredFormat = null, bool supportsWriting = true)

Parameters

mapping TypeInfoMapping

The mapping to create an info for.

options PgSerializerOptions

The options to use.

resolver PgConverterResolver

The converter resolver to create a PgResolverTypeInfo for.

includeDataTypeName bool

Whether to pass mapping.DataTypeName to the PgResolverTypeInfo constructor, mandatory when TypeInfoFactory(..., requiresDataTypeName: true).

preferredFormat DataFormat?

Whether to prefer a specific data format for this info, when null it defaults to the most suitable format.

supportsWriting bool

Whether the converters returned from the given converter resolver support writing.

Returns

PgResolverTypeInfo

The created info instance.