Class CsvTypeMapAttribute<T, TValue>
- Namespace
- FlameCsv.Attributes
- Assembly
- FlameCsv.Core.dll
Applies source generated binding logic to the annotated partial class.
[AttributeUsage(AttributeTargets.Class)]
public sealed class CsvTypeMapAttribute<T, TValue> : Attribute where T : unmanaged, IBinaryInteger<T>
Type Parameters
T
TValue
- Inheritance
-
CsvTypeMapAttribute<T, TValue>
Remarks
CsvTypeMap<T, TValue> instances should be stateless and immutable.
To use custom value creation logic, create a parameterless instance or static method CreateInstance()
that returns TValue
or a subtype.
Automatically creates a Instance
-property if the type has a parameterless constructor,
and no member with that name already exists.
Properties
IgnoreUnmatched
If true, headers that cannot be matched to a member are ignored instead of throwing.
public bool IgnoreUnmatched { get; set; }
Property Value
NoCaching
Disables caching of de/materializers for this type map.
public bool NoCaching { get; set; }
Property Value
Remarks
Caching is enabled by default. The cache is used on calls to public methods on the base class CsvTypeMap.
- See Also
SupportsAssemblyAttributes
If true, the source generator will scan for attributes applied to the containing assembly.
public bool SupportsAssemblyAttributes { get; set; }
Property Value
ThrowOnDuplicate
If true, multiple header field matches to a single member throw an exception. The default behavior does not attempt to match already matched members.
public bool ThrowOnDuplicate { get; set; }