public StackTransition(IEnumerable <TypeOnStack> popped, IEnumerable <TypeOnStack> pushed, VerificationCallback before = null) { PoppedFromStack = LinqEnumerable <TypeOnStack> .For(popped).ToArray(); PushedToStack = LinqEnumerable <TypeOnStack> .For(pushed).ToArray(); Before = before; }
public static LinqRoot <T> Distinct <T>(IEnumerable <T> e) { if (e == null) { throw new ArgumentNullException("e"); } return(LinqEnumerable <T> .For(_Distinct(e, EqualityComparer <T> .Default))); }
public static LinqRoot <T> Cast <T>(IEnumerable e) { if (e == null) { throw new ArgumentNullException("e"); } return(LinqEnumerable <T> .For(_Cast <T>(e))); }
public StackTransition(IEnumerable <Type> popped, IEnumerable <Type> pushed, VerificationCallback before = null) : this ( LinqEnumerable <Type> .For(popped).Select(s => TypeOnStack.Get(s)).AsEnumerable(), LinqEnumerable <Type> .For(pushed).Select(s => TypeOnStack.Get(s)).AsEnumerable(), before ) { }
public static LinqRoot <T> OrderByDescending <T, V>(IEnumerable <T> e, SigilFunc <T, V> p) { if (e == null) { throw new ArgumentNullException("e"); } if (p == null) { throw new ArgumentNullException("p"); } return(LinqEnumerable <T> .For(_Order(e, p, DescendingComparer <V> .Default))); }
public static LinqRoot <T> Where <T>(IEnumerable <T> e, SigilFunc <T, bool> p) { if (e == null) { throw new ArgumentNullException("e"); } if (p == null) { throw new ArgumentNullException("p"); } return(LinqEnumerable <T> .For(_Where(e, p))); }
public static LinqRoot <V> SelectMany <T, V>(IEnumerable <T> e, SigilFunc <T, IEnumerable <V> > p) { if (e == null) { throw new ArgumentNullException("e"); } if (p == null) { throw new ArgumentNullException("p"); } return(LinqEnumerable <V> .For(_SelectMany(e, p))); }
public static LinqRoot <T> Skip <T>(IEnumerable <T> e, int n) { if (e == null) { throw new ArgumentNullException("e"); } if (n < 0) { throw new ArgumentException("n"); } return(LinqEnumerable <T> .For(_Skip(e, n))); }
public static VerificationResult FailureTypeMismatch(VerifiableTracker verifier, int transitionIndex, int stackIndex, IEnumerable <TypeOnStack> expectedTypes, LinqStack <LinqList <TypeOnStack> > stack) { return (new VerificationResult { Success = false, Verifier = verifier.Clone(), TransitionIndex = transitionIndex, IsTypeMismatch = true, StackIndex = stackIndex, ExpectedAtStackIndex = LinqEnumerable <TypeOnStack> .For(expectedTypes), Stack = stack }); }