internal Tabulator( string expression, Delegate method, int argsCount) : this(expression, argsCount) { Debug.Assert(method != null); Debug.Assert(argsCount <= 2); if (argsCount == 1) { this.tabulator2 = ThrowMethod2; this.tabulator1 = (TabFunc1 <T>)method; this.tabulatorN = (a, d) => this.tabulator1((T[])a, d[0], d[1]); } else { this.tabulator1 = ThrowMethod1; this.tabulator2 = (TabFunc2 <T>)method; this.tabulatorN = (a, d) => this.tabulator2((T[][])a, d[0], d[1], d[2], d[3]); } #if FULL_FW if (argsCount == 1) { this.asyncTab = (TabFunc1 <T>) this.tabulator1.Invoke; } else { this.asyncTab = (TabFunc2 <T>) this.tabulator2.Invoke; } #endif }
internal Tabulator( string expression, Delegate method, int argsCount, Allocator <T> alloc) : this(expression, argsCount) { Debug.Assert(method != null); Debug.Assert(alloc != null); Debug.Assert(argsCount > 2); this.tabulator1 = ThrowMethod1; this.tabulator2 = ThrowMethod2; this.tabulatorN = (TabFuncN <T>)method; this.allocator = alloc; #if FULL_FW this.asyncTab = (TabFuncN <T>) this.tabulatorN.Invoke; #endif }