Skip to content

Commit 23c0710

Browse files
committed
- PR comments
1 parent ca7ed44 commit 23c0710

33 files changed

+1176
-1131
lines changed

src/MongoDB.Driver/Linq/MongoQueryable.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ public static IMongoQueryable<TSource> Sample<TSource>(this IMongoQueryable<TSou
925925
}
926926

927927
/// <summary>
928-
/// Appends a $search stage to the LINQ pipeline
928+
/// Appends a $search stage to the LINQ pipeline.
929929
/// </summary>
930930
/// <typeparam name="TSource">The type of the elements of <paramref name="source" />.</typeparam>
931931
/// <param name="source">A sequence of values.</param>
@@ -937,7 +937,7 @@ public static IMongoQueryable<TSource> Sample<TSource>(this IMongoQueryable<TSou
937937
/// Flag that specifies whether to perform a full document lookup on the backend database
938938
/// or return only stored source fields directly from Atlas Search.
939939
/// </param>
940-
/// <returns>The fluent aggregate interface.</returns>
940+
/// <returns>The queryable with a new stage appended.</returns>
941941
public static IMongoQueryable<TSource> Search<TSource>(
942942
this IMongoQueryable<TSource> source,
943943
SearchDefinition<TSource> searchDefinition,
@@ -952,14 +952,14 @@ public static IMongoQueryable<TSource> Search<TSource>(
952952
}
953953

954954
/// <summary>
955-
/// Appends a $searchMeta stage to the LINQ pipeline
955+
/// Appends a $searchMeta stage to the LINQ pipeline.
956956
/// </summary>
957957
/// <typeparam name="TSource">The type of the elements of <paramref name="source" />.</typeparam>
958958
/// <param name="source">A sequence of values.</param>
959959
/// <param name="searchDefinition">The search definition.</param>
960960
/// <param name="indexName">The index name.</param>
961961
/// <param name="count">The count options.</param>
962-
/// <returns>The fluent aggregate interface.</returns>
962+
/// <returns>The queryable with a new stage appended.</returns>
963963
public static IMongoQueryable<SearchMetaResult> SearchMeta<TSource>(
964964
this IMongoQueryable<TSource> source,
965965
SearchDefinition<TSource> searchDefinition,

src/MongoDB.Driver/Search/CompoundSearchDefinitionFluent.cs

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
// Copyright 2010-present MongoDB Inc.
2-
//
3-
// Licensed under the Apache License, Version 2.0 (the "License");
4-
// you may not use this file except in compliance with the License.
5-
// You may obtain a copy of the License at
6-
//
7-
// http://www.apache.org/licenses/LICENSE-2.0
8-
//
9-
// Unless required by applicable law or agreed to in writing, software
10-
// distributed under the License is distributed on an "AS IS" BASIS,
11-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
// See the License for the specific language governing permissions and
13-
// limitations under the License.
1+
/* Copyright 2016-present MongoDB Inc.
2+
*
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*/
1415

1516
using System.Collections.Generic;
1617
using MongoDB.Driver.Core.Misc;
@@ -129,8 +130,8 @@ public static implicit operator SearchDefinition<TDocument>(CompoundSearchDefini
129130

130131
private CompoundSearchDefinitionFluent<TDocument> AddClauses(ref List<SearchDefinition<TDocument>> clauses, IEnumerable<SearchDefinition<TDocument>> newClauses)
131132
{
132-
clauses ??= new();
133-
clauses.AddRange(Ensure.IsNotNull(newClauses, nameof(newClauses)));
133+
Ensure.IsNotNull(newClauses, nameof(newClauses));
134+
(clauses ??= new()).AddRange(newClauses);
134135

135136
return this;
136137
}

src/MongoDB.Driver/Search/GeoShapeRelation.cs

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
// Copyright 2010-present MongoDB Inc.
2-
//
3-
// Licensed under the Apache License, Version 2.0 (the "License");
4-
// you may not use this file except in compliance with the License.
5-
// You may obtain a copy of the License at
6-
//
7-
// http://www.apache.org/licenses/LICENSE-2.0
8-
//
9-
// Unless required by applicable law or agreed to in writing, software
10-
// distributed under the License is distributed on an "AS IS" BASIS,
11-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
// See the License for the specific language governing permissions and
13-
// limitations under the License.
1+
/* Copyright 2016-present MongoDB Inc.
2+
*
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*/
1415

1516
namespace MongoDB.Driver.Search
1617
{

src/MongoDB.Driver/Search/GeoWithin.cs

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
// Copyright 2010-present MongoDB Inc.
2-
//
3-
// Licensed under the Apache License, Version 2.0 (the "License");
4-
// you may not use this file except in compliance with the License.
5-
// You may obtain a copy of the License at
6-
//
7-
// http://www.apache.org/licenses/LICENSE-2.0
8-
//
9-
// Unless required by applicable law or agreed to in writing, software
10-
// distributed under the License is distributed on an "AS IS" BASIS,
11-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
// See the License for the specific language governing permissions and
13-
// limitations under the License.
1+
/* Copyright 2016-present MongoDB Inc.
2+
*
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*/
1415

1516
using MongoDB.Bson;
1617
using MongoDB.Driver.Core.Misc;
@@ -23,7 +24,7 @@ namespace MongoDB.Driver.Search
2324
/// search within.
2425
/// </summary>
2526
/// <typeparam name="TCoordinates">The type of the coordinates.</typeparam>
26-
public abstract class GeoWithin<TCoordinates> where TCoordinates : GeoJsonCoordinates
27+
public abstract class GeoWithinArea<TCoordinates> where TCoordinates : GeoJsonCoordinates
2728
{
2829
internal abstract BsonElement Render();
2930
}
@@ -33,7 +34,7 @@ public abstract class GeoWithin<TCoordinates> where TCoordinates : GeoJsonCoordi
3334
/// search within.
3435
/// </summary>
3536
/// <typeparam name="TCoordinates">The type of the coordinates.</typeparam>
36-
public sealed class GeoWithinBox<TCoordinates> : GeoWithin<TCoordinates> where TCoordinates : GeoJsonCoordinates
37+
public sealed class GeoWithinBox<TCoordinates> : GeoWithinArea<TCoordinates> where TCoordinates : GeoJsonCoordinates
3738
{
3839
/// <summary>
3940
/// Initializes a new instance of the <see cref="GeoWithinBox{TCoordinates}"/> class.
@@ -63,7 +64,7 @@ internal override BsonElement Render() =>
6364
/// <summary>
6465
/// Object that specifies the center point and the radius in meters to search within.
6566
/// </summary>
66-
public sealed class GeoWithinCircle<TCoordinates> : GeoWithin<TCoordinates> where TCoordinates : GeoJsonCoordinates
67+
public sealed class GeoWithinCircle<TCoordinates> : GeoWithinArea<TCoordinates> where TCoordinates : GeoJsonCoordinates
6768
{
6869
/// <summary>
6970
/// Initializes a new instance of the <see cref="GeoWithinCircle{TCoordinates}"/> class.
@@ -94,7 +95,7 @@ internal override BsonElement Render() =>
9495
/// Object that specifies the GeoJson geometry to search within.
9596
/// </summary>
9697
/// <typeparam name="TCoordinates">The type of the coordinates.</typeparam>
97-
public sealed class GeoWithinGeometry<TCoordinates> : GeoWithin<TCoordinates> where TCoordinates : GeoJsonCoordinates
98+
public sealed class GeoWithinGeometry<TCoordinates> : GeoWithinArea<TCoordinates> where TCoordinates : GeoJsonCoordinates
9899
{
99100
/// <summary>
100101
/// Initializes a new instance of the <see cref="GeoWithinBox{TCoordinates}"/> class.

0 commit comments

Comments
 (0)