// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. #pragma warning disable 1591 using System.Linq.Expressions; using System.Reactive.Linq; namespace System.Reactive.Joins { /// /// Abstract base class for join patterns represented by an expression tree. /// public abstract class QueryablePattern { /// /// Creates a new join pattern object using the specified expression tree represention. /// /// Expression tree representing the join pattern. protected QueryablePattern(Expression expression) { Expression = expression; } /// /// Gets the expression tree representing the join pattern. /// public Expression Expression { get; private set; } } /* The following code is generated by a tool checked in to $/.../Source/Tools/CodeGenerators. */ #region Joins auto-generated code (8/4/2012 1:00:32 AM) /// /// Represents a join pattern over two observable sequences. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. public class QueryablePattern : QueryablePattern { internal QueryablePattern(Expression expression) : base(expression) { } /// /// Creates a pattern that matches when all three observable sequences have an available element. /// /// The type of the elements in the third observable sequence. /// Observable sequence to match with the two previous sequences. /// Pattern object that matches when all observable sequences have an available element. /// is null. public QueryablePattern And(IObservable other) { if (other == null) throw new ArgumentNullException("other"); var t = typeof(QueryablePattern); var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource3)); return new QueryablePattern( Expression.Call( Expression, m, Qbservable.GetSourceExpression(other) ) ); } /// /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function. /// /// The type of the elements in the result sequence, returned by the selector function. /// Selector that will be invoked for elements in the source sequences. /// Plan that produces the projected results, to be fed (with other plans) to the When operator. /// is null. public QueryablePlan Then(Expression> selector) { if (selector == null) throw new ArgumentNullException("selector"); var t = typeof(QueryablePattern); var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult)); return new QueryablePlan( Expression.Call( Expression, m, selector ) ); } } /// /// Represents a join pattern over three observable sequences. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. public class QueryablePattern : QueryablePattern { internal QueryablePattern(Expression expression) : base(expression) { } /// /// Creates a pattern that matches when all four observable sequences have an available element. /// /// The type of the elements in the fourth observable sequence. /// Observable sequence to match with the three previous sequences. /// Pattern object that matches when all observable sequences have an available element. /// is null. public QueryablePattern And(IObservable other) { if (other == null) throw new ArgumentNullException("other"); var t = typeof(QueryablePattern); var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource4)); return new QueryablePattern( Expression.Call( Expression, m, Qbservable.GetSourceExpression(other) ) ); } /// /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function. /// /// The type of the elements in the result sequence, returned by the selector function. /// Selector that will be invoked for elements in the source sequences. /// Plan that produces the projected results, to be fed (with other plans) to the When operator. /// is null. public QueryablePlan Then(Expression> selector) { if (selector == null) throw new ArgumentNullException("selector"); var t = typeof(QueryablePattern); var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult)); return new QueryablePlan( Expression.Call( Expression, m, selector ) ); } } /// /// Represents a join pattern over four observable sequences. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. public class QueryablePattern : QueryablePattern { internal QueryablePattern(Expression expression) : base(expression) { } #if !NO_LARGEARITY /// /// Creates a pattern that matches when all five observable sequences have an available element. /// /// The type of the elements in the fifth observable sequence. /// Observable sequence to match with the four previous sequences. /// Pattern object that matches when all observable sequences have an available element. /// is null. public QueryablePattern And(IObservable other) { if (other == null) throw new ArgumentNullException("other"); var t = typeof(QueryablePattern); var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource5)); return new QueryablePattern( Expression.Call( Expression, m, Qbservable.GetSourceExpression(other) ) ); } #endif /// /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function. /// /// The type of the elements in the result sequence, returned by the selector function. /// Selector that will be invoked for elements in the source sequences. /// Plan that produces the projected results, to be fed (with other plans) to the When operator. /// is null. public QueryablePlan Then(Expression> selector) { if (selector == null) throw new ArgumentNullException("selector"); var t = typeof(QueryablePattern); var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult)); return new QueryablePlan( Expression.Call( Expression, m, selector ) ); } } #if !NO_LARGEARITY /// /// Represents a join pattern over five observable sequences. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. public class QueryablePattern : QueryablePattern { internal QueryablePattern(Expression expression) : base(expression) { } /// /// Creates a pattern that matches when all six observable sequences have an available element. /// /// The type of the elements in the sixth observable sequence. /// Observable sequence to match with the five previous sequences. /// Pattern object that matches when all observable sequences have an available element. /// is null. public QueryablePattern And(IObservable other) { if (other == null) throw new ArgumentNullException("other"); var t = typeof(QueryablePattern); var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource6)); return new QueryablePattern( Expression.Call( Expression, m, Qbservable.GetSourceExpression(other) ) ); } /// /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function. /// /// The type of the elements in the result sequence, returned by the selector function. /// Selector that will be invoked for elements in the source sequences. /// Plan that produces the projected results, to be fed (with other plans) to the When operator. /// is null. public QueryablePlan Then(Expression> selector) { if (selector == null) throw new ArgumentNullException("selector"); var t = typeof(QueryablePattern); var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult)); return new QueryablePlan( Expression.Call( Expression, m, selector ) ); } } /// /// Represents a join pattern over six observable sequences. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. public class QueryablePattern : QueryablePattern { internal QueryablePattern(Expression expression) : base(expression) { } /// /// Creates a pattern that matches when all seven observable sequences have an available element. /// /// The type of the elements in the seventh observable sequence. /// Observable sequence to match with the six previous sequences. /// Pattern object that matches when all observable sequences have an available element. /// is null. public QueryablePattern And(IObservable other) { if (other == null) throw new ArgumentNullException("other"); var t = typeof(QueryablePattern); var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource7)); return new QueryablePattern( Expression.Call( Expression, m, Qbservable.GetSourceExpression(other) ) ); } /// /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function. /// /// The type of the elements in the result sequence, returned by the selector function. /// Selector that will be invoked for elements in the source sequences. /// Plan that produces the projected results, to be fed (with other plans) to the When operator. /// is null. public QueryablePlan Then(Expression> selector) { if (selector == null) throw new ArgumentNullException("selector"); var t = typeof(QueryablePattern); var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult)); return new QueryablePlan( Expression.Call( Expression, m, selector ) ); } } /// /// Represents a join pattern over seven observable sequences. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. public class QueryablePattern : QueryablePattern { internal QueryablePattern(Expression expression) : base(expression) { } /// /// Creates a pattern that matches when all eight observable sequences have an available element. /// /// The type of the elements in the eighth observable sequence. /// Observable sequence to match with the seven previous sequences. /// Pattern object that matches when all observable sequences have an available element. /// is null. public QueryablePattern And(IObservable other) { if (other == null) throw new ArgumentNullException("other"); var t = typeof(QueryablePattern); var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource8)); return new QueryablePattern( Expression.Call( Expression, m, Qbservable.GetSourceExpression(other) ) ); } /// /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function. /// /// The type of the elements in the result sequence, returned by the selector function. /// Selector that will be invoked for elements in the source sequences. /// Plan that produces the projected results, to be fed (with other plans) to the When operator. /// is null. public QueryablePlan Then(Expression> selector) { if (selector == null) throw new ArgumentNullException("selector"); var t = typeof(QueryablePattern); var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult)); return new QueryablePlan( Expression.Call( Expression, m, selector ) ); } } /// /// Represents a join pattern over eight observable sequences. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. public class QueryablePattern : QueryablePattern { internal QueryablePattern(Expression expression) : base(expression) { } /// /// Creates a pattern that matches when all nine observable sequences have an available element. /// /// The type of the elements in the ninth observable sequence. /// Observable sequence to match with the eight previous sequences. /// Pattern object that matches when all observable sequences have an available element. /// is null. public QueryablePattern And(IObservable other) { if (other == null) throw new ArgumentNullException("other"); var t = typeof(QueryablePattern); var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource9)); return new QueryablePattern( Expression.Call( Expression, m, Qbservable.GetSourceExpression(other) ) ); } /// /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function. /// /// The type of the elements in the result sequence, returned by the selector function. /// Selector that will be invoked for elements in the source sequences. /// Plan that produces the projected results, to be fed (with other plans) to the When operator. /// is null. public QueryablePlan Then(Expression> selector) { if (selector == null) throw new ArgumentNullException("selector"); var t = typeof(QueryablePattern); var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult)); return new QueryablePlan( Expression.Call( Expression, m, selector ) ); } } /// /// Represents a join pattern over nine observable sequences. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. /// The type of the elements in the ninth source sequence. public class QueryablePattern : QueryablePattern { internal QueryablePattern(Expression expression) : base(expression) { } /// /// Creates a pattern that matches when all ten observable sequences have an available element. /// /// The type of the elements in the tenth observable sequence. /// Observable sequence to match with the nine previous sequences. /// Pattern object that matches when all observable sequences have an available element. /// is null. public QueryablePattern And(IObservable other) { if (other == null) throw new ArgumentNullException("other"); var t = typeof(QueryablePattern); var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource10)); return new QueryablePattern( Expression.Call( Expression, m, Qbservable.GetSourceExpression(other) ) ); } /// /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function. /// /// The type of the elements in the result sequence, returned by the selector function. /// Selector that will be invoked for elements in the source sequences. /// Plan that produces the projected results, to be fed (with other plans) to the When operator. /// is null. public QueryablePlan Then(Expression> selector) { if (selector == null) throw new ArgumentNullException("selector"); var t = typeof(QueryablePattern); var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult)); return new QueryablePlan( Expression.Call( Expression, m, selector ) ); } } /// /// Represents a join pattern over ten observable sequences. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. /// The type of the elements in the ninth source sequence. /// The type of the elements in the tenth source sequence. public class QueryablePattern : QueryablePattern { internal QueryablePattern(Expression expression) : base(expression) { } /// /// Creates a pattern that matches when all eleven observable sequences have an available element. /// /// The type of the elements in the eleventh observable sequence. /// Observable sequence to match with the ten previous sequences. /// Pattern object that matches when all observable sequences have an available element. /// is null. public QueryablePattern And(IObservable other) { if (other == null) throw new ArgumentNullException("other"); var t = typeof(QueryablePattern); var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource11)); return new QueryablePattern( Expression.Call( Expression, m, Qbservable.GetSourceExpression(other) ) ); } /// /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function. /// /// The type of the elements in the result sequence, returned by the selector function. /// Selector that will be invoked for elements in the source sequences. /// Plan that produces the projected results, to be fed (with other plans) to the When operator. /// is null. public QueryablePlan Then(Expression> selector) { if (selector == null) throw new ArgumentNullException("selector"); var t = typeof(QueryablePattern); var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult)); return new QueryablePlan( Expression.Call( Expression, m, selector ) ); } } /// /// Represents a join pattern over eleven observable sequences. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. /// The type of the elements in the ninth source sequence. /// The type of the elements in the tenth source sequence. /// The type of the elements in the eleventh source sequence. public class QueryablePattern : QueryablePattern { internal QueryablePattern(Expression expression) : base(expression) { } /// /// Creates a pattern that matches when all twelve observable sequences have an available element. /// /// The type of the elements in the twelfth observable sequence. /// Observable sequence to match with the eleven previous sequences. /// Pattern object that matches when all observable sequences have an available element. /// is null. public QueryablePattern And(IObservable other) { if (other == null) throw new ArgumentNullException("other"); var t = typeof(QueryablePattern); var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource12)); return new QueryablePattern( Expression.Call( Expression, m, Qbservable.GetSourceExpression(other) ) ); } /// /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function. /// /// The type of the elements in the result sequence, returned by the selector function. /// Selector that will be invoked for elements in the source sequences. /// Plan that produces the projected results, to be fed (with other plans) to the When operator. /// is null. public QueryablePlan Then(Expression> selector) { if (selector == null) throw new ArgumentNullException("selector"); var t = typeof(QueryablePattern); var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult)); return new QueryablePlan( Expression.Call( Expression, m, selector ) ); } } /// /// Represents a join pattern over twelve observable sequences. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. /// The type of the elements in the ninth source sequence. /// The type of the elements in the tenth source sequence. /// The type of the elements in the eleventh source sequence. /// The type of the elements in the twelfth source sequence. public class QueryablePattern : QueryablePattern { internal QueryablePattern(Expression expression) : base(expression) { } /// /// Creates a pattern that matches when all thirteen observable sequences have an available element. /// /// The type of the elements in the thirteenth observable sequence. /// Observable sequence to match with the twelve previous sequences. /// Pattern object that matches when all observable sequences have an available element. /// is null. public QueryablePattern And(IObservable other) { if (other == null) throw new ArgumentNullException("other"); var t = typeof(QueryablePattern); var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource13)); return new QueryablePattern( Expression.Call( Expression, m, Qbservable.GetSourceExpression(other) ) ); } /// /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function. /// /// The type of the elements in the result sequence, returned by the selector function. /// Selector that will be invoked for elements in the source sequences. /// Plan that produces the projected results, to be fed (with other plans) to the When operator. /// is null. public QueryablePlan Then(Expression> selector) { if (selector == null) throw new ArgumentNullException("selector"); var t = typeof(QueryablePattern); var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult)); return new QueryablePlan( Expression.Call( Expression, m, selector ) ); } } /// /// Represents a join pattern over thirteen observable sequences. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. /// The type of the elements in the ninth source sequence. /// The type of the elements in the tenth source sequence. /// The type of the elements in the eleventh source sequence. /// The type of the elements in the twelfth source sequence. /// The type of the elements in the thirteenth source sequence. public class QueryablePattern : QueryablePattern { internal QueryablePattern(Expression expression) : base(expression) { } /// /// Creates a pattern that matches when all fourteen observable sequences have an available element. /// /// The type of the elements in the fourteenth observable sequence. /// Observable sequence to match with the thirteen previous sequences. /// Pattern object that matches when all observable sequences have an available element. /// is null. public QueryablePattern And(IObservable other) { if (other == null) throw new ArgumentNullException("other"); var t = typeof(QueryablePattern); var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource14)); return new QueryablePattern( Expression.Call( Expression, m, Qbservable.GetSourceExpression(other) ) ); } /// /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function. /// /// The type of the elements in the result sequence, returned by the selector function. /// Selector that will be invoked for elements in the source sequences. /// Plan that produces the projected results, to be fed (with other plans) to the When operator. /// is null. public QueryablePlan Then(Expression> selector) { if (selector == null) throw new ArgumentNullException("selector"); var t = typeof(QueryablePattern); var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult)); return new QueryablePlan( Expression.Call( Expression, m, selector ) ); } } /// /// Represents a join pattern over fourteen observable sequences. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. /// The type of the elements in the ninth source sequence. /// The type of the elements in the tenth source sequence. /// The type of the elements in the eleventh source sequence. /// The type of the elements in the twelfth source sequence. /// The type of the elements in the thirteenth source sequence. /// The type of the elements in the fourteenth source sequence. public class QueryablePattern : QueryablePattern { internal QueryablePattern(Expression expression) : base(expression) { } /// /// Creates a pattern that matches when all fifteen observable sequences have an available element. /// /// The type of the elements in the fifteenth observable sequence. /// Observable sequence to match with the fourteen previous sequences. /// Pattern object that matches when all observable sequences have an available element. /// is null. public QueryablePattern And(IObservable other) { if (other == null) throw new ArgumentNullException("other"); var t = typeof(QueryablePattern); var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource15)); return new QueryablePattern( Expression.Call( Expression, m, Qbservable.GetSourceExpression(other) ) ); } /// /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function. /// /// The type of the elements in the result sequence, returned by the selector function. /// Selector that will be invoked for elements in the source sequences. /// Plan that produces the projected results, to be fed (with other plans) to the When operator. /// is null. public QueryablePlan Then(Expression> selector) { if (selector == null) throw new ArgumentNullException("selector"); var t = typeof(QueryablePattern); var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult)); return new QueryablePlan( Expression.Call( Expression, m, selector ) ); } } /// /// Represents a join pattern over fifteen observable sequences. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. /// The type of the elements in the ninth source sequence. /// The type of the elements in the tenth source sequence. /// The type of the elements in the eleventh source sequence. /// The type of the elements in the twelfth source sequence. /// The type of the elements in the thirteenth source sequence. /// The type of the elements in the fourteenth source sequence. /// The type of the elements in the fifteenth source sequence. public class QueryablePattern : QueryablePattern { internal QueryablePattern(Expression expression) : base(expression) { } /// /// Creates a pattern that matches when all sixteen observable sequences have an available element. /// /// The type of the elements in the sixteenth observable sequence. /// Observable sequence to match with the fifteen previous sequences. /// Pattern object that matches when all observable sequences have an available element. /// is null. public QueryablePattern And(IObservable other) { if (other == null) throw new ArgumentNullException("other"); var t = typeof(QueryablePattern); var m = t.GetMethod("And").MakeGenericMethod(typeof(TSource16)); return new QueryablePattern( Expression.Call( Expression, m, Qbservable.GetSourceExpression(other) ) ); } /// /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function. /// /// The type of the elements in the result sequence, returned by the selector function. /// Selector that will be invoked for elements in the source sequences. /// Plan that produces the projected results, to be fed (with other plans) to the When operator. /// is null. public QueryablePlan Then(Expression> selector) { if (selector == null) throw new ArgumentNullException("selector"); var t = typeof(QueryablePattern); var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult)); return new QueryablePlan( Expression.Call( Expression, m, selector ) ); } } /// /// Represents a join pattern over sixteen observable sequences. /// /// The type of the elements in the first source sequence. /// The type of the elements in the second source sequence. /// The type of the elements in the third source sequence. /// The type of the elements in the fourth source sequence. /// The type of the elements in the fifth source sequence. /// The type of the elements in the sixth source sequence. /// The type of the elements in the seventh source sequence. /// The type of the elements in the eighth source sequence. /// The type of the elements in the ninth source sequence. /// The type of the elements in the tenth source sequence. /// The type of the elements in the eleventh source sequence. /// The type of the elements in the twelfth source sequence. /// The type of the elements in the thirteenth source sequence. /// The type of the elements in the fourteenth source sequence. /// The type of the elements in the fifteenth source sequence. /// The type of the elements in the sixteenth source sequence. public class QueryablePattern : QueryablePattern { internal QueryablePattern(Expression expression) : base(expression) { } /// /// Matches when all observable sequences have an available element and projects the elements by invoking the selector function. /// /// The type of the elements in the result sequence, returned by the selector function. /// Selector that will be invoked for elements in the source sequences. /// Plan that produces the projected results, to be fed (with other plans) to the When operator. /// is null. public QueryablePlan Then(Expression> selector) { if (selector == null) throw new ArgumentNullException("selector"); var t = typeof(QueryablePattern); var m = t.GetMethod("Then").MakeGenericMethod(typeof(TResult)); return new QueryablePlan( Expression.Call( Expression, m, selector ) ); } } #endif #endregion } #pragma warning restore 1591