Table of Contents

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 bool

Inherits parent object prefixes.

HeaderPrefixAttribute(string)

Appends a prefix to the header of each field of the reference member.

public HeaderPrefixAttribute(string prefix)

Parameters

prefix string

The prefix.

HeaderPrefixAttribute(string, bool)

Appends a prefix to the header of each field of the reference member.

public HeaderPrefixAttribute(string prefix, bool inherit)

Parameters

prefix string

The prefix.

inherit bool

Inherits parent object prefixes.

Properties

Inherit

Gets a value indicating whether the prefix should inherit parent prefixes.

public bool Inherit { get; }

Property Value

bool

Prefix

Gets the prefix.

public string? Prefix { get; }

Property Value

string

Methods

ApplyTo(MemberReferenceMap)

public void ApplyTo(MemberReferenceMap referenceMap)

Parameters

referenceMap MemberReferenceMap

ApplyTo(ParameterReferenceMap)

public void ApplyTo(ParameterReferenceMap referenceMap)

Parameters

referenceMap ParameterReferenceMap