/// <summary> /// Initializes a new instance of the <see cref="TimeTranscodingFieldOrdinal"/> class. /// Initializes a new instance of the <see cref="T:System.Object"/> class. /// </summary> /// <param name="mapping"> /// The mapping. /// </param> /// <param name="expression"> /// The expression. /// </param> public TimeTranscodingFieldOrdinal(MappingEntity mapping, TimeExpressionEntity expression) { this._yearColumn = new NameOrdinal(GetColumnName(mapping, expression.YearColumnSysId)); this._periodColumn = new NameOrdinal(GetColumnName(mapping, expression.PeriodColumnSysId)); this._dateColumn = new NameOrdinal(GetColumnName(mapping, expression.DateColumnSysId)); if (this._yearColumn.IsSet) { this._nameOrdinals = this._periodColumn.IsSet ? new[] { this._yearColumn, this._periodColumn } : new[] { this._yearColumn }; } else { this._nameOrdinals = new[] { this._dateColumn }; } }
/// <summary> /// Initializes a new instance of the <see cref="TimeTranscodingFieldOrdinal"/> class. /// Initializes a new instance of the <see cref="T:System.Object"/> class. /// </summary> /// <param name="mapping"> /// The mapping. /// </param> /// <param name="expression"> /// The expression. /// </param> public TimeTranscodingFieldOrdinal(MappingEntity mapping, TimeExpressionEntity expression) { this._yearColumn = new NameOrdinal(GetColumnName(mapping, expression.YearColumnSysId)); this._periodColumn = new NameOrdinal(GetColumnName(mapping, expression.PeriodColumnSysId)); this._dateColumn = new NameOrdinal(GetColumnName(mapping, expression.DateColumnSysId)); if (this._yearColumn.IsSet) { this._nameOrdinals = this._periodColumn.IsSet ? new[] { this._yearColumn, this._periodColumn } : new[] { this._yearColumn }; } else { this._nameOrdinals = new[] { this._dateColumn }; } }