# Class PgConverterResolver<T>

Namespace
  Npgsql.Internal

Assembly
  Npgsql.dll

    public abstract class PgConverterResolver<T> : PgConverterResolver

#### Type Parameters

`T`

Inheritance
  object
  PgConverterResolver
  PgConverterResolver<T>

Inherited Members
  PgConverterResolver.GetDefault(PgTypeId?)
  PgConverterResolver.Get(Field)
  PgConverterResolver.CreateUnsupportedPgTypeIdException(PgTypeId)
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)
  object.ToString()

## Methods

### Get(T?, PgTypeId?)

Gets the appropriate converter to write with based on the given value.

    public abstract PgConverterResolution? Get(T? value, PgTypeId? expectedPgTypeId)

#### Parameters

`value` T
`expectedPgTypeId` PgTypeId?

#### Returns

PgConverterResolution?

  The converter resolution.

#### Remarks

Implementations should not return new instances of the possible converters that can be returned, instead its expected these are cached once used. Array or other collection converters depend on this to cache their own converter - which wraps the element converter - with the cache key being the element converter reference.