Class HeaderPrefixAttribute
- Namespace
- CsvHelper.Configuration.Attributes
- Assembly
- CsvHelper.dll
Appends a prefix to the header of each field of the reference member.
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field|AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)]
public class HeaderPrefixAttribute : Attribute, IMemberReferenceMapper, IParameterReferenceMapper
- Inheritance
-
HeaderPrefixAttribute
- Implements
- Inherited Members
Constructors
HeaderPrefixAttribute()
Appends a prefix to the header of each field of the reference member.
public HeaderPrefixAttribute()
HeaderPrefixAttribute(bool)
Appends a prefix to the header of each field of the reference member.
public HeaderPrefixAttribute(bool inherit)
Parameters
inherit
boolInherits parent object prefixes.
HeaderPrefixAttribute(string)
Appends a prefix to the header of each field of the reference member.
public HeaderPrefixAttribute(string prefix)
Parameters
prefix
stringThe prefix.
HeaderPrefixAttribute(string, bool)
Appends a prefix to the header of each field of the reference member.
public HeaderPrefixAttribute(string prefix, bool inherit)
Parameters
Properties
Inherit
Gets a value indicating whether the prefix should inherit parent prefixes.
public bool Inherit { get; }
Property Value
Prefix
Gets the prefix.
public string? Prefix { get; }
Property Value
Methods
ApplyTo(MemberReferenceMap)
public void ApplyTo(MemberReferenceMap referenceMap)
Parameters
referenceMap
MemberReferenceMap
ApplyTo(ParameterReferenceMap)
public void ApplyTo(ParameterReferenceMap referenceMap)
Parameters
referenceMap
ParameterReferenceMap