示例#1
0
 /// <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!");
     }
 };
示例#2
0
 /// <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)
     });
 }
示例#3
0
 /// <inheritdoc cref="StandardScanShareableAnalyzer{S}.AdditionalPreconditions"/>
 public override IEnumerable <Action <StructType> > AdditionalPreconditions() =>
 new[] { AnalyzersExt.HasColumn(Column), AnalyzersExt.IsString(Column.GetOrElse(string.Empty)) };
示例#4
0
 /// <inheritdoc cref="StandardScanShareableAnalyzer{S}.AdditionalPreconditions"/>
 public override IEnumerable <Action <StructType> > AdditionalPreconditions() =>
 new[] { AnalyzersExt.HasColumn(Column), AnalyzersExt.IsNotNested(Column) };
示例#5
0
 /// <inheritdoc cref="StandardScanShareableAnalyzer{S}.Preconditions"/>.
 public override IEnumerable <Action <StructType> > Preconditions() =>
 new[] { AnalyzersExt.HasColumn(Column), AnalyzersExt.IsNotNested(Column) }.Concat(base.Preconditions());
示例#6
0
 /// <inheritdoc cref="Analyzer{S,M}.Preconditions"/>
 public override IEnumerable <Action <StructType> > Preconditions() =>
 new[] { PARAM_CHECK(), AnalyzersExt.HasColumn(Column) };