File tree Expand file tree Collapse file tree 3 files changed +40
-0
lines changed
MongoDB.Driver/Communication/Messages Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,11 @@ internal override void WriteBodyTo(BsonBuffer buffer)
7878
7979 internal override void WriteHeaderTo ( BsonBuffer buffer )
8080 {
81+ if ( ( _flags & QueryFlags . Exhaust ) != 0 )
82+ {
83+ throw new NotSupportedException ( "The Exhaust QueryFlag is not yet supported." ) ;
84+ }
85+
8186 base . WriteHeaderTo ( buffer ) ;
8287 buffer . WriteInt32 ( ( int ) _flags ) ;
8388 buffer . WriteCString ( new UTF8Encoding ( false , true ) , _collectionFullName ) ;
Original file line number Diff line number Diff line change 1+ /* Copyright 2010-2014 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+ */
15+
16+ using System ;
17+ using System . Linq ;
18+ using MongoDB . Driver ;
19+ using NUnit . Framework ;
20+
21+ namespace MongoDB . DriverUnitTests . Jira
22+ {
23+ [ TestFixture ]
24+ public class CSharp942Tests
25+ {
26+ [ Test ]
27+ public void TestExhaustQueryFlagThrowsException ( )
28+ {
29+ var collection = Configuration . TestCollection ;
30+ var cursor = collection . FindAll ( ) . SetFlags ( QueryFlags . Exhaust ) ;
31+ Assert . Throws < NotSupportedException > ( ( ) => cursor . ToList ( ) ) ;
32+ }
33+ }
34+ }
Original file line number Diff line number Diff line change 134134 <Compile Include =" Jira\CSharp653Tests.cs" />
135135 <Compile Include =" Jira\CSharp714Tests.cs" />
136136 <Compile Include =" Jira\CSharp718Tests.cs" />
137+ <Compile Include =" Jira\CSharp942Tests.cs" />
137138 <Compile Include =" Jira\CSharp779Tests.cs" />
138139 <Compile Include =" Jira\CSharp801Tests.cs" />
139140 <Compile Include =" Jira\CSharp840Tests.cs" />
You can’t perform that action at this time.
0 commit comments