ReflectionCsvTypeInfoResolver Class
Creates the metadata of types with reflection.
public sealed class ReflectionCsvTypeInfoResolver : ICsvTypeInfoResolverRemarks
This resolver is not compatible with trimming and Native AOT: use a generated CsvSerializerContext instead.
- Implements
Constructors
| Name | Description |
|---|---|
| ReflectionCsvTypeInfoResolver() | Initializes a new instance of the ReflectionCsvTypeInfoResolver class. |
ReflectionCsvTypeInfoResolver()
ReflectionCsvTypeInfoResolver.csInitializes a new instance of the ReflectionCsvTypeInfoResolver class.
[RequiresDynamicCode("Reflection-based CSV serialization is not compatible with trimming and Native AOT. Use a generated CsvSerializerContext and the overloads that take a CsvTypeInfo.")]
[RequiresUnreferencedCode("Reflection-based CSV serialization is not compatible with trimming and Native AOT. Use a generated CsvSerializerContext and the overloads that take a CsvTypeInfo.")]
public ReflectionCsvTypeInfoResolver()Properties
| Name | Description |
|---|---|
| Default | Gets the default instance. |
Gets the default instance.
public static ReflectionCsvTypeInfoResolver Default { get; }Property value
Methods
| Name | Description |
|---|---|
| GetTypeInfo(Type, CsvSerializerOptions) | Gets the serialization metadata of a type. |
GetTypeInfo(Type, CsvSerializerOptions)
ReflectionCsvTypeInfoResolver.csGets the serialization metadata of a type.
public CsvTypeInfo? GetTypeInfo(Type type, CsvSerializerOptions options)Parameters
typeType- The type.
optionsCsvSerializerOptions- The options the metadata is created for.
Returns
CsvTypeInfo? The metadata, or null when the resolver does not support type.