示例#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);
 }
示例#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)));
 }
示例#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);
 }
示例#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);
 }
示例#5
0
 public ForAllFunction()
     : base("ForAll", TexlStrings.AboutForAll, FunctionCategories.Table, DType.Unknown, 0x2, 2, 2, DType.EmptyTable)
 {
     ScopeInfo = new FunctionScopeInfo(this);
 }
示例#6
0
 public FilterFunction()
     : base("Filter", TexlStrings.AboutFilter, FunctionCategories.Table, DType.EmptyTable, -2, 2, int.MaxValue, DType.EmptyTable)
 {
     ScopeInfo = new FunctionScopeInfo(this, acceptsLiteralPredicates: false);
 }
示例#7
0
 public SortFunction()
     : base("Sort", TexlStrings.AboutSort, FunctionCategories.Table, DType.EmptyTable, 0x02, 2, 3, DType.EmptyTable)
 {
     ScopeInfo           = new FunctionScopeInfo(this);
     _sortOrderValidator = ArgValidators.SortOrderValidator;
 }
示例#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);
 }
示例#10
0
文件: With.cs 项目: jgrisham/Power-Fx
 public WithFunction()
     : base("With", TexlStrings.AboutWith, FunctionCategories.Table, DType.Unknown, 0x2, 2, 2, DType.EmptyRecord)
 {
     ScopeInfo = new FunctionScopeInfo(this, iteratesOverScope: false);
 }