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.
Inherited Members
Namespace: ETLBox
Assembly: ETLBox.dll
Syntax
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct, AllowMultiple = true, Inherited = true)]
public sealed class AddColumn : AttributeConstructors
AddColumn()
Declaration
public AddColumn()AddColumn(string)
Declaration
public AddColumn(string propertyName)Parameters
| Type | Name | Description |
|---|---|---|
| string | propertyName | Name of the property that is added to the output. |
AddColumn(string, bool)
Declaration
public AddColumn(string propertyName, bool value)Parameters
| Type | Name | Description |
|---|---|---|
| string | propertyName | Name of the property that is added to the output. |
| bool | value | Constant value of the added property. |
AddColumn(string, byte)
Declaration
public AddColumn(string propertyName, byte value)Parameters
| Type | Name | Description |
|---|---|---|
| string | propertyName | Name of the property that is added to the output. |
| byte | value | Constant value of the added property. |
AddColumn(string, char)
Declaration
public AddColumn(string propertyName, char value)Parameters
| Type | Name | Description |
|---|---|---|
| string | propertyName | Name of the property that is added to the output. |
| char | value | Constant value of the added property. |
AddColumn(string, double)
Declaration
public AddColumn(string propertyName, double value)Parameters
| Type | Name | Description |
|---|---|---|
| string | propertyName | Name of the property that is added to the output. |
| double | value | Constant value of the added property. |
AddColumn(string, short)
Declaration
public AddColumn(string propertyName, short value)Parameters
| Type | Name | Description |
|---|---|---|
| string | propertyName | Name of the property that is added to the output. |
| short | value | Constant value of the added property. |
AddColumn(string, int)
Declaration
public AddColumn(string propertyName, int value)Parameters
| Type | Name | Description |
|---|---|---|
| string | propertyName | Name of the property that is added to the output. |
| int | value | Constant value of the added property. |
AddColumn(string, long)
Declaration
public AddColumn(string propertyName, long value)Parameters
| Type | Name | Description |
|---|---|---|
| string | propertyName | Name of the property that is added to the output. |
| long | value | Constant value of the added property. |
AddColumn(string, float)
Declaration
public AddColumn(string propertyName, float value)Parameters
| Type | Name | Description |
|---|---|---|
| string | propertyName | Name of the property that is added to the output. |
| float | value | Constant value of the added property. |
AddColumn(string, string)
Declaration
public AddColumn(string propertyName, string value)Parameters
| Type | Name | Description |
|---|---|---|
| string | propertyName | Name of the property that is added to the output. |
| string | value | Constant value of the added property. |
AddColumn(string, Type)
Declaration
public AddColumn(string propertyName, Type value)Parameters
| Type | Name | Description |
|---|---|---|
| string | propertyName | Name of the property that is added to the output. |
| Type | value | 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
| Type | Description |
|---|---|
| string |
Value
Constant value of the added property. Ignored when ValueFunc is set.
Declaration
public object Value { get; set; }Property Value
| Type | Description |
|---|---|
| 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
| Type | Description |
|---|---|
| Func<dynamic, object> |