# Class TypeInfoMappingHelpers

Namespace
  Npgsql.Internal

Assembly
  Npgsql.dll

    [Experimental("NPG9001")]
    public static class TypeInfoMappingHelpers

Inheritance
  object
  TypeInfoMappingHelpers

Inherited Members
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)
  object.ToString()

## 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.