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
typeTypeThe 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
Operators
implicit operator Type(TypeWithDefaultConstructor)
Implicitly converts a ConverterTypeCollection.TypeWithDefaultConstructor instance to its underlying Type.
public static implicit operator Type(ConverterTypeCollection.TypeWithDefaultConstructor type)
Parameters
typeConverterTypeCollection.TypeWithDefaultConstructorThe ConverterTypeCollection.TypeWithDefaultConstructor instance to convert.
Returns
implicit operator TypeWithDefaultConstructor(Type)
Implicitly converts a Type to a ConverterTypeCollection.TypeWithDefaultConstructor.
public static implicit operator ConverterTypeCollection.TypeWithDefaultConstructor(Type type)
Parameters
typeTypeThe type to convert.
Returns
Remarks
This operator enables seamless conversion from a Type to a ConverterTypeCollection.TypeWithDefaultConstructor.