Table of Contents

Struct ConverterTypeCollection.TypeWithDefaultConstructor

Namespace
Nerdbank.MessagePack
Assembly
Nerdbank.MessagePack.dll

A wrapper around Type that ensures a trimmed application will preserve the type's public default constructor.

public readonly struct ConverterTypeCollection.TypeWithDefaultConstructor
Inherited Members

Constructors

TypeWithDefaultConstructor(Type)

A wrapper around Type that ensures a trimmed application will preserve the type's public default constructor.

public TypeWithDefaultConstructor(Type type)

Parameters

type Type

The wrapped type. A type that does not declare a public default constructor may still be wrapped, but may result in a runtime error later.

Properties

Type

Gets the wrapped type.

public Type Type { get; }

Property Value

Type

Operators

implicit operator Type(TypeWithDefaultConstructor)

Implicitly converts a ConverterTypeCollection.TypeWithDefaultConstructor instance to its underlying Type.

public static implicit operator Type(ConverterTypeCollection.TypeWithDefaultConstructor type)

Parameters

type ConverterTypeCollection.TypeWithDefaultConstructor

The ConverterTypeCollection.TypeWithDefaultConstructor instance to convert.

Returns

Type

implicit operator TypeWithDefaultConstructor(Type)

public static implicit operator ConverterTypeCollection.TypeWithDefaultConstructor(Type type)

Parameters

type Type

The type to convert.

Returns

ConverterTypeCollection.TypeWithDefaultConstructor

Remarks

This operator enables seamless conversion from a Type to a ConverterTypeCollection.TypeWithDefaultConstructor.