File tree Expand file tree Collapse file tree 7 files changed +16
-15
lines changed Expand file tree Collapse file tree 7 files changed +16
-15
lines changed Original file line number Diff line number Diff line change 183
183
<Compile Include =" Linq\Evaluator.cs" />
184
184
<Compile Include =" Linq\ExpressionPrettyPrinter.cs" />
185
185
<Compile Include =" Linq\ExpressionVisitor.cs" />
186
- <Compile Include =" Linq\MongoLinqFindQuery .cs" />
187
- <Compile Include =" Linq\MongoLinqExtensionMethods .cs" />
186
+ <Compile Include =" Linq\TranslatedFindQuery .cs" />
187
+ <Compile Include =" Linq\ExtensionMethods .cs" />
188
188
<Compile Include =" Linq\MongoQueryable.cs" />
189
189
<Compile Include =" Linq\MongoQueryProvider.cs" />
190
- <Compile Include =" Linq\MongoLinqTranslator .cs" />
191
- <Compile Include =" Linq\MongoLinqQuery .cs" />
190
+ <Compile Include =" Linq\MongoQueryTranslator .cs" />
191
+ <Compile Include =" Linq\TranslatedQuery .cs" />
192
192
<Compile Include =" Linq\TypeSystem.cs" />
193
193
<Compile Include =" MongoUtils.cs" />
194
194
<Compile Include =" MongoDefaults.cs" />
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ namespace MongoDB.Driver.Linq
26
26
/// <summary>
27
27
/// Static class that contains the Mongo Linq extension methods.
28
28
/// </summary>
29
- public static class MongoLinqExtensionMethods
29
+ public static class ExtensionMethods
30
30
{
31
31
/// <summary>
32
32
/// Returns an instance of IQueryable{{T}} for a MongoCollection.
Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ public TResult Execute<TResult>(Expression expression)
182
182
{
183
183
throw new ArgumentException ( "Argument expression is not valid." ) ;
184
184
}
185
- var translatedQuery = MongoLinqTranslator . Translate ( _collection , expression ) ;
185
+ var translatedQuery = MongoQueryTranslator . Translate ( _collection , expression ) ;
186
186
return ( TResult ) translatedQuery . Execute ( ) ;
187
187
}
188
188
@@ -225,7 +225,7 @@ public IEnumerator<T> GetEnumerator<T>(Expression expression)
225
225
{
226
226
throw new ArgumentException ( "Argument expression is not valid." ) ;
227
227
}
228
- var translatedQuery = MongoLinqTranslator . Translate ( _collection , expression ) ;
228
+ var translatedQuery = MongoQueryTranslator . Translate ( _collection , expression ) ;
229
229
return translatedQuery . GetEnumerator < T > ( ) ;
230
230
}
231
231
@@ -236,7 +236,7 @@ public IEnumerator<T> GetEnumerator<T>(Expression expression)
236
236
/// <returns>A string.</returns>
237
237
public string GetQueryText ( Expression expression )
238
238
{
239
- var translatedQuery = MongoLinqTranslator . Translate ( _collection , expression ) ;
239
+ var translatedQuery = MongoQueryTranslator . Translate ( _collection , expression ) ;
240
240
return translatedQuery . ToString ( ) ;
241
241
}
242
242
}
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ namespace MongoDB.Driver.Linq
25
25
/// <summary>
26
26
/// A translator from LINQ expression queries to Mongo queries.
27
27
/// </summary>
28
- public static class MongoLinqTranslator
28
+ public static class MongoQueryTranslator
29
29
{
30
30
// public static methods
31
31
/// <summary>
@@ -34,13 +34,13 @@ public static class MongoLinqTranslator
34
34
/// <param name="collection">The collection being queried.</param>
35
35
/// <param name="expression">The LINQ query.</param>
36
36
/// <returns>An instance of MongoLinqQuery.</returns>
37
- public static MongoLinqQuery Translate ( MongoCollection collection , Expression expression )
37
+ public static TranslatedQuery Translate ( MongoCollection collection , Expression expression )
38
38
{
39
39
expression = Evaluator . PartialEval ( expression ) ;
40
40
41
41
// total hack just to test the initial LINQ framework
42
42
var query = MongoDB . Driver . Builders . Query . EQ ( "X" , 1 ) ;
43
- return new MongoLinqFindQuery ( collection , query ) ;
43
+ return new TranslatedFindQuery ( collection , query ) ;
44
44
}
45
45
}
46
46
}
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ namespace MongoDB.Driver.Linq
28
28
{
29
29
/// <summary>
30
30
/// An implementation of IQueryable{{T}} for querying a MongoDB collection.
31
+ /// This class has been named MongoQueryable instead of MongoQuery to avoid confusion with IMongoQuery.
31
32
/// </summary>
32
33
public class MongoQueryable < T > : IOrderedQueryable < T >
33
34
{
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ namespace MongoDB.Driver.Linq
25
25
/// <summary>
26
26
/// Represents a LINQ query that has been translated to an equivalent MongoDB Find query.
27
27
/// </summary>
28
- public class MongoLinqFindQuery : MongoLinqQuery
28
+ public class TranslatedFindQuery : TranslatedQuery
29
29
{
30
30
// private fields
31
31
private IMongoQuery _query ;
@@ -36,7 +36,7 @@ public class MongoLinqFindQuery : MongoLinqQuery
36
36
/// </summary>
37
37
/// <param name="collection">The collection being queried.</param>
38
38
/// <param name="query">The query.</param>
39
- public MongoLinqFindQuery ( MongoCollection collection , IMongoQuery query )
39
+ public TranslatedFindQuery ( MongoCollection collection , IMongoQuery query )
40
40
: base ( collection )
41
41
{
42
42
_query = query ;
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ namespace MongoDB.Driver.Linq
25
25
/// <summary>
26
26
/// Represents a LINQ query that has been translated to a MongoDB query.
27
27
/// </summary>
28
- public abstract class MongoLinqQuery
28
+ public abstract class TranslatedQuery
29
29
{
30
30
// protected fields
31
31
/// <summary>
@@ -38,7 +38,7 @@ public abstract class MongoLinqQuery
38
38
/// Initializes a new instance of the MongoLinqQuery class.
39
39
/// </summary>
40
40
/// <param name="collection">The collection being queried.</param>
41
- protected MongoLinqQuery ( MongoCollection collection )
41
+ protected TranslatedQuery ( MongoCollection collection )
42
42
{
43
43
_collection = collection ;
44
44
}
You can’t perform that action at this time.
0 commit comments