-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathParallelQueryExpr.cs
More file actions
67 lines (61 loc) · 1.92 KB
/
Copy pathParallelQueryExpr.cs
File metadata and controls
67 lines (61 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Nessos.LinqOptimizer.Core;
namespace Nessos.LinqOptimizer.Base
{
/// <summary>
/// This interface represents an optimized parallel query.
/// </summary>
public interface IParallelQueryExpr
{
/// <summary>
/// The expression representing the query.
/// </summary>
QueryExpr Expr { get; }
}
/// <summary>
/// This interface represents an optimized parallel query.
/// </summary>
/// <typeparam name="T">The type of the query.</typeparam>
public interface IParallelQueryExpr<out T> : IParallelQueryExpr { }
/// <summary>
/// The concrete implementation of an optimized query.
/// </summary>
public class ParallelQueryExprVoid : IParallelQueryExpr
{
private QueryExpr _expr;
/// <summary>
/// The expression representing the query.
/// </summary>
public QueryExpr Expr { get { return _expr; } }
/// <summary>
/// Initializes a new instance of the <see cref="ParallelQueryExprVoid"/> class.
/// </summary>
/// <param name="query">The expression.</param>
public ParallelQueryExprVoid(QueryExpr query)
{
_expr = query;
}
}
/// <summary>
/// The concrete implementation of an optimized query.
/// </summary>
public class ParallelQueryExpr<T> : IParallelQueryExpr<T>
{
private QueryExpr _expr;
/// <summary>
/// The expression representing the query.
/// </summary>
public QueryExpr Expr { get { return _expr; } }
/// <summary>
/// Initializes a new instance of the <see cref="ParallelQueryExpr{T}"/> class.
/// </summary>
/// <param name="query">The expression.</param>
public ParallelQueryExpr(QueryExpr query)
{
_expr = query;
}
}
}