Class MappingConditional
- Namespace
- Dynamicweb.DataIntegration.Integration
- Assembly
- Dynamicweb.DataIntegration.dll
Used to describe the conditions that must be met for a row to be included in a job.
public class MappingConditional
- Inheritance
-
MappingConditional
- Inherited Members
Constructors
MappingConditional(ISource?, Column, ConditionalOperator, string, int, Mapping, bool)
Initializes a new instance of the MappingConditional class.
public MappingConditional(ISource? source, Column sourceColumn, ConditionalOperator conditionalOperator, string condition, int id, Mapping mapping, bool useCodeExtension)
Parameters
sourceISourceThe Isource the conditional is to be applied to
sourceColumnColumnThe source column.
conditionalOperatorConditionalOperatorThe conditional operator.
conditionstringThe condition.
idintThe id.
mappingMappingThe mapping.
useCodeExtensionboolThe condition use CodeExpression.
MappingConditional(XmlNode, Mapping, int, ISource?)
Initializes a new instance of the MappingConditional class from XML input. This is used when an activity is saved
public MappingConditional(XmlNode xmlNode, Mapping mapping, int id, ISource? source)
Parameters
xmlNodeXmlNodeThe XML node.
mappingMappingThe mapping.
idintThe id.
sourceISourceThe source.
Fields
Source
The Source this conditional is to be applied to.
public readonly ISource? Source
Field Value
Properties
Active
Gets or sets if the condition is active
public bool Active { get; set; }
Property Value
Condition
Gets or sets the string which is used in the comparison.
public string Condition { get; set; }
Property Value
- string
The condition.
ConditionalOperator
Gets or sets the conditional operator. The options are:
- LessThan
- GreateThan
- Equals
- Contains
public ConditionalOperator ConditionalOperator { get; set; }
Property Value
- ConditionalOperator
The conditional operator.
FormatCulture
Gets or sets the name of the culture the condition is read in, for example "en-US". When not set, the culture of the job is used (see GetEffectiveCulture()).
public string? FormatCulture { get; set; }
Property Value
Group
Gets the Conditional Group
public MappingConditionalGroup? Group { get; set; }
Property Value
IsBroken
Gets whether this conditional is currently having the "everything passes" effect described by SourceColumnMissing: it is itself active, its column is missing, and it is not silenced by an inactive Group. CheckConditionals(Dictionary<string, object>) skips an inactive group's conditionals entirely, so a broken conditional inside one plays no part in filtering regardless of its own Active flag - fixing it would not change any row's outcome. A conditional with no group (Group is null) is unaffected by this and only depends on its own Active flag.
public bool IsBroken { get; }
Property Value
IsNullOrEmptyStringCondition
Returns true if null or empty string filtering
public bool IsNullOrEmptyStringCondition { get; }
Property Value
IsNullStringCondition
Returns true if null string filtering
public bool IsNullStringCondition { get; }
Property Value
Mapping
Table Mapping
public Mapping Mapping { get; }
Property Value
SourceColumn
Gets or sets the source column.
public Column? SourceColumn { get; set; }
Property Value
- Column
The source column.
SourceColumnMissing
Gets whether the source column this conditional refers to could not be resolved against the current source schema
public bool SourceColumnMissing { get; }
Property Value
SourceColumnName
The is used to store the original source column name fetched from the job file when the source column does not exists
public string? SourceColumnName { get; set; }
Property Value
UseCodeExtension
public bool UseCodeExtension { get; set; }
Property Value
Methods
GetId()
Gets the id.
public int GetId()
Returns
TryParse(string, out ConditionalOperator)
Tries to parse conditional string to the ConditionalOperator equivalent
public static bool TryParse(string stringOperator, out ConditionalOperator conditionalOperator)
Parameters
stringOperatorstringThe conditional string operator.
conditionalOperatorConditionalOperatorParsed conditionalOperator
Returns
- bool
True if condition was parsed. Otherwise false.