/// <summary> /// Checks if a schema has a specific column name. /// </summary> /// <param name="column">The name of the column to verify.</param> /// <returns>A callback asserting the presence of the column in the schema.</returns> private static Action <StructType> HasColumn(string column) => schema => { if (!AnalyzersExt.HasColumn(schema, column)) { throw new Exception("Input data does not include column!"); } };
/// <inheritdoc cref="StandardScanShareableAnalyzer{S}.AdditionalPreconditions" /> public override IEnumerable <Action <StructType> > AdditionalPreconditions() { return(new[] { AnalyzersExt.HasColumn(ColumnA), AnalyzersExt.IsNumeric(ColumnA), AnalyzersExt.HasColumn(ColumnB), AnalyzersExt.IsNumeric(ColumnB) }); }
/// <inheritdoc cref="StandardScanShareableAnalyzer{S}.AdditionalPreconditions"/> public override IEnumerable <Action <StructType> > AdditionalPreconditions() => new[] { AnalyzersExt.HasColumn(Column), AnalyzersExt.IsString(Column.GetOrElse(string.Empty)) };
/// <inheritdoc cref="StandardScanShareableAnalyzer{S}.AdditionalPreconditions"/> public override IEnumerable <Action <StructType> > AdditionalPreconditions() => new[] { AnalyzersExt.HasColumn(Column), AnalyzersExt.IsNotNested(Column) };
/// <inheritdoc cref="StandardScanShareableAnalyzer{S}.Preconditions"/>. public override IEnumerable <Action <StructType> > Preconditions() => new[] { AnalyzersExt.HasColumn(Column), AnalyzersExt.IsNotNested(Column) }.Concat(base.Preconditions());
/// <inheritdoc cref="Analyzer{S,M}.Preconditions"/> public override IEnumerable <Action <StructType> > Preconditions() => new[] { PARAM_CHECK(), AnalyzersExt.HasColumn(Column) };