Beispiel #1
0
 public AddColumnsFunction()
     : base("AddColumns", TexlStrings.AboutAddColumns, FunctionCategories.Table, DType.EmptyTable, 0, 3, int.MaxValue, DType.EmptyTable)
 {
     // AddColumns(source, name, valueFunc, name, valueFunc, ..., name, valueFunc, ...)
     SignatureConstraint = new SignatureConstraint(omitStartIndex: 5, repeatSpan: 2, endNonRepeatCount: 0, repeatTopLength: 9);
     ScopeInfo           = new FunctionScopeInfo(this);
 }
Beispiel #2
0
 public IfErrorFunction()
     : base("IfError", TexlStrings.AboutIfError, FunctionCategories.Logical, DType.Unknown, 0, 2, int.MaxValue)
 {
     ScopeInfo = new FunctionScopeInfo(this,
                                       iteratesOverScope: false,
                                       scopeType: DType.CreateRecord(
                                           new TypedName(ErrorType.ReifiedError(), new DName("FirstError")),
                                           new TypedName(ErrorType.ReifiedErrorTable(), new DName("AllErrors")),
                                           new TypedName(DType.ObjNull, new DName("ErrorResult"))),
                                       appliesToArgument: (i => i > 0 && (i % 2 == 1)));
 }
Beispiel #3
0
 public ConcatFunction()
     : base("Concat", TexlStrings.AboutConcat, FunctionCategories.Table, DType.String, 0x02, 2, 3, DType.EmptyTable, DType.String)
 {
     ScopeInfo = new FunctionScopeInfo(this, usesAllFieldsInScope: false);
 }
Beispiel #4
0
 public CountIfFunction()
     : base("CountIf", TexlStrings.AboutCountIf, FunctionCategories.Table | FunctionCategories.MathAndStat, DType.Number, -2, 2, int.MaxValue, DType.EmptyTable, DType.Boolean)
 {
     ScopeInfo = new FunctionScopeInfo(this, usesAllFieldsInScope: false);
 }
Beispiel #5
0
 public ForAllFunction()
     : base("ForAll", TexlStrings.AboutForAll, FunctionCategories.Table, DType.Unknown, 0x2, 2, 2, DType.EmptyTable)
 {
     ScopeInfo = new FunctionScopeInfo(this);
 }
Beispiel #6
0
 public FilterFunction()
     : base("Filter", TexlStrings.AboutFilter, FunctionCategories.Table, DType.EmptyTable, -2, 2, int.MaxValue, DType.EmptyTable)
 {
     ScopeInfo = new FunctionScopeInfo(this, acceptsLiteralPredicates: false);
 }
Beispiel #7
0
 public SortFunction()
     : base("Sort", TexlStrings.AboutSort, FunctionCategories.Table, DType.EmptyTable, 0x02, 2, 3, DType.EmptyTable)
 {
     ScopeInfo           = new FunctionScopeInfo(this);
     _sortOrderValidator = ArgValidators.SortOrderValidator;
 }
Beispiel #8
0
 public LookUpFunction()
     : base("LookUp", TexlStrings.AboutLookUp, FunctionCategories.Table, DType.Unknown, 0x6, 2, 3, DType.EmptyTable, DType.Boolean)
 {
     ScopeInfo = new FunctionScopeInfo(this);
 }
 public StatisticalTableFunction(string name, TexlStrings.StringGetter description, FunctionCategories fc)
     : base(name, description, fc, DType.Number, 0x02, 2, 2, DType.EmptyTable, DType.Number)
 {
     ScopeInfo = new FunctionScopeInfo(this, usesAllFieldsInScope: false, acceptsLiteralPredicates: false);
 }
Beispiel #10
0
 public WithFunction()
     : base("With", TexlStrings.AboutWith, FunctionCategories.Table, DType.Unknown, 0x2, 2, 2, DType.EmptyRecord)
 {
     ScopeInfo = new FunctionScopeInfo(this, iteratesOverScope: false);
 }