<PackageReference Include="System.Reactive" Version="7.0.0-preview.1" />
QueryablePattern<TSource1, TSource2>
using System.
Linq.
Expressions;
using System.
Reactive.
Linq;
using System.
Reflection;
using System.
Runtime.
CompilerServices;
namespace System.
Reactive.
Joins
{
[
System.
Runtime.
CompilerServices.
NullableContext(
1)]
[
System.
Runtime.
CompilerServices.
Nullable(
0)]
public class QueryablePattern<[
System.
Runtime.
CompilerServices.
Nullable(
2)]
TSource1, [
System.
Runtime.
CompilerServices.
Nullable(
2)]
TSource2> :
QueryablePattern
{
internal QueryablePattern(
Expression expression)
:
base(
expression)
{
}
public QueryablePattern<
TSource1,
TSource2,
TSource3>
And<[
System.
Runtime.
CompilerServices.
Nullable(
2)]
TSource3>(
IObservable<
TSource3>
other)
{
if (
other ==
null)
throw new ArgumentNullException(
"other");
MethodInfo method =
typeof(
QueryablePattern<
TSource1,
TSource2>).
GetMethod(
"And").
MakeGenericMethod(
typeof(
TSource3));
return new QueryablePattern<
TSource1,
TSource2,
TSource3>((
Expression)
Expression.
Call(
base.
Expression,
method,
Qbservable.
GetSourceExpression<
TSource3>(
other)));
}
public QueryablePlan<
TResult>
Then<[
System.
Runtime.
CompilerServices.
Nullable(
2)]
TResult>(
Expression<
Func<
TSource1,
TSource2,
TResult>>
selector)
{
if (
selector ==
null)
throw new ArgumentNullException(
"selector");
MethodInfo method =
typeof(
QueryablePattern<
TSource1,
TSource2>).
GetMethod(
"Then").
MakeGenericMethod(
typeof(
TResult));
return new QueryablePlan<
TResult>((
Expression)
Expression.
Call(
base.
Expression,
method,
selector));
}
}
}