Class AddColumn

Adds a new property to the ExpandoObject produced by a column transformation. Place it on a class to add a constant value, or assign a list of these objects to AddColumns. A non-empty list replaces the attributes. If ValueFunc is set, it replaces Value.

Inheritance
AddColumn
Inherited Members
Namespace: ETLBox
Assembly: ETLBox.dll
Syntax
    [AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct, AllowMultiple = true, Inherited = true)]
public sealed class AddColumn : Attribute

Constructors

AddColumn()

Declaration
    public AddColumn()

AddColumn(string)

Declaration
    public AddColumn(string propertyName)
Parameters
TypeNameDescription
stringpropertyName

Name of the property that is added to the output.

AddColumn(string, bool)

Declaration
    public AddColumn(string propertyName, bool value)
Parameters
TypeNameDescription
stringpropertyName

Name of the property that is added to the output.

boolvalue

Constant value of the added property.

AddColumn(string, byte)

Declaration
    public AddColumn(string propertyName, byte value)
Parameters
TypeNameDescription
stringpropertyName

Name of the property that is added to the output.

bytevalue

Constant value of the added property.

AddColumn(string, char)

Declaration
    public AddColumn(string propertyName, char value)
Parameters
TypeNameDescription
stringpropertyName

Name of the property that is added to the output.

charvalue

Constant value of the added property.

AddColumn(string, double)

Declaration
    public AddColumn(string propertyName, double value)
Parameters
TypeNameDescription
stringpropertyName

Name of the property that is added to the output.

doublevalue

Constant value of the added property.

AddColumn(string, short)

Declaration
    public AddColumn(string propertyName, short value)
Parameters
TypeNameDescription
stringpropertyName

Name of the property that is added to the output.

shortvalue

Constant value of the added property.

AddColumn(string, int)

Declaration
    public AddColumn(string propertyName, int value)
Parameters
TypeNameDescription
stringpropertyName

Name of the property that is added to the output.

intvalue

Constant value of the added property.

AddColumn(string, long)

Declaration
    public AddColumn(string propertyName, long value)
Parameters
TypeNameDescription
stringpropertyName

Name of the property that is added to the output.

longvalue

Constant value of the added property.

AddColumn(string, float)

Declaration
    public AddColumn(string propertyName, float value)
Parameters
TypeNameDescription
stringpropertyName

Name of the property that is added to the output.

floatvalue

Constant value of the added property.

AddColumn(string, string)

Declaration
    public AddColumn(string propertyName, string value)
Parameters
TypeNameDescription
stringpropertyName

Name of the property that is added to the output.

stringvalue

Constant value of the added property.

AddColumn(string, Type)

Declaration
    public AddColumn(string propertyName, Type value)
Parameters
TypeNameDescription
stringpropertyName

Name of the property that is added to the output.

Typevalue

Constant value of the added property.

Properties

PropertyName

Name of the property that is added to the output.

Declaration
    public string PropertyName { get; set; }
Property Value
TypeDescription
string

Value

Constant value of the added property. Ignored when ValueFunc is set.

Declaration
    public object Value { get; set; }
Property Value
TypeDescription
object

ValueFunc

Optional function that receives the current input row and returns the new property value. When set, this replaces Value. Cannot be assigned through attribute syntax. The row is dynamic. Convert value types before concatenating them with strings.

Declaration
    public Func<dynamic, object> ValueFunc { get; set; }
Property Value
TypeDescription
Func<dynamic, object>