Table of Contents

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

source ISource

The Isource the conditional is to be applied to

sourceColumn Column

The source column.

conditionalOperator ConditionalOperator

The conditional operator.

condition string

The condition.

id int

The id.

mapping Mapping

The mapping.

useCodeExtension bool

The 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

xmlNode XmlNode

The XML node.

mapping Mapping

The mapping.

id int

The id.

source ISource

The source.

Fields

Source

The Source this conditional is to be applied to.

public readonly ISource? Source

Field Value

ISource

Properties

Active

Gets or sets if the condition is active

public bool Active { get; set; }

Property Value

bool

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

string

Group

Gets the Conditional Group

public MappingConditionalGroup? Group { get; set; }

Property Value

MappingConditionalGroup

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

bool

IsNullOrEmptyStringCondition

Returns true if null or empty string filtering

public bool IsNullOrEmptyStringCondition { get; }

Property Value

bool

IsNullStringCondition

Returns true if null string filtering

public bool IsNullStringCondition { get; }

Property Value

bool

Mapping

Table Mapping

public Mapping Mapping { get; }

Property Value

Mapping

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

bool

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

string

UseCodeExtension

public bool UseCodeExtension { get; set; }

Property Value

bool

Methods

GetId()

Gets the id.

public int GetId()

Returns

int

TryParse(string, out ConditionalOperator)

Tries to parse conditional string to the ConditionalOperator equivalent

public static bool TryParse(string stringOperator, out ConditionalOperator conditionalOperator)

Parameters

stringOperator string

The conditional string operator.

conditionalOperator ConditionalOperator

Parsed conditionalOperator

Returns

bool

True if condition was parsed. Otherwise false.

To top