Skip to content

Commit 28ed947

Browse files
CSHARP-3858: Remove code that implements support for server version 3.4. (#703)
CSHARP-3858: Remove code that implements support for server version 3.4.
1 parent 8a4ace7 commit 28ed947

File tree

110 files changed

+449
-5219
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+449
-5219
lines changed

src/MongoDB.Driver.Core/Core/Bindings/IChannel.cs

Lines changed: 0 additions & 251 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
using MongoDB.Bson.IO;
2222
using MongoDB.Bson.Serialization;
2323
using MongoDB.Driver.Core.Connections;
24-
using MongoDB.Driver.Core.Misc;
2524
using MongoDB.Driver.Core.WireProtocol;
2625
using MongoDB.Driver.Core.WireProtocol.Messages;
2726
using MongoDB.Driver.Core.WireProtocol.Messages.Encoders;
@@ -49,62 +48,6 @@ public interface IChannel : IDisposable
4948
/// </value>
5049
ConnectionDescription ConnectionDescription { get; }
5150

52-
/// <summary>
53-
/// Executes a Command protocol.
54-
/// </summary>
55-
/// <typeparam name="TResult">The type of the result.</typeparam>
56-
/// <param name="databaseNamespace">The database namespace.</param>
57-
/// <param name="command">The command.</param>
58-
/// <param name="commandValidator">The command validator.</param>
59-
/// <param name="responseHandling">The response handling.</param>
60-
/// <param name="secondaryOk">if set to <c>true</c> sets the SecondaryOk bit to true in the command message sent to the server.</param>
61-
/// <param name="resultSerializer">The result serializer.</param>
62-
/// <param name="messageEncoderSettings">The message encoder settings.</param>
63-
/// <param name="cancellationToken">The cancellation token.</param>
64-
/// <returns>The result of the Command protocol.</returns>
65-
[Obsolete("Use the newest overload instead.")]
66-
TResult Command<TResult>(
67-
DatabaseNamespace databaseNamespace,
68-
BsonDocument command,
69-
IElementNameValidator commandValidator,
70-
Func<CommandResponseHandling> responseHandling,
71-
bool secondaryOk,
72-
IBsonSerializer<TResult> resultSerializer,
73-
MessageEncoderSettings messageEncoderSettings,
74-
CancellationToken cancellationToken);
75-
76-
/// <summary>
77-
/// Executes a Command protocol.
78-
/// </summary>
79-
/// <typeparam name="TResult">The type of the result.</typeparam>
80-
/// <param name="session">The session.</param>
81-
/// <param name="readPreference">The read preference.</param>
82-
/// <param name="databaseNamespace">The database namespace.</param>
83-
/// <param name="command">The command.</param>
84-
/// <param name="commandValidator">The command validator.</param>
85-
/// <param name="additionalOptions">The additional options.</param>
86-
/// <param name="responseHandling">The response handling.</param>
87-
/// <param name="secondaryOk">if set to <c>true</c> sets the SecondaryOk bit to true in the command message sent to the server.</param>
88-
/// <param name="resultSerializer">The result serializer.</param>
89-
/// <param name="messageEncoderSettings">The message encoder settings.</param>
90-
/// <param name="cancellationToken">The cancellation token.</param>
91-
/// <returns>
92-
/// The result of the Command protocol.
93-
/// </returns>
94-
[Obsolete("Use the newest overload instead.")]
95-
TResult Command<TResult>(
96-
ICoreSession session,
97-
ReadPreference readPreference,
98-
DatabaseNamespace databaseNamespace,
99-
BsonDocument command,
100-
IElementNameValidator commandValidator,
101-
BsonDocument additionalOptions,
102-
Func<CommandResponseHandling> responseHandling,
103-
bool secondaryOk,
104-
IBsonSerializer<TResult> resultSerializer,
105-
MessageEncoderSettings messageEncoderSettings,
106-
CancellationToken cancellationToken);
107-
10851
/// <summary>
10952
/// Executes a Command protocol.
11053
/// </summary>
@@ -138,62 +81,6 @@ TResult Command<TResult>(
13881
MessageEncoderSettings messageEncoderSettings,
13982
CancellationToken cancellationToken);
14083

141-
/// <summary>
142-
/// Executes a Command protocol.
143-
/// </summary>
144-
/// <typeparam name="TResult">The type of the result.</typeparam>
145-
/// <param name="databaseNamespace">The database namespace.</param>
146-
/// <param name="command">The command.</param>
147-
/// <param name="commandValidator">The command validator.</param>
148-
/// <param name="responseHandling">The response handling.</param>
149-
/// <param name="secondaryOk">if set to <c>true</c> sets the SecondaryOk bit to true in the command message sent to the server.</param>
150-
/// <param name="resultSerializer">The result serializer.</param>
151-
/// <param name="messageEncoderSettings">The message encoder settings.</param>
152-
/// <param name="cancellationToken">The cancellation token.</param>
153-
/// <returns>A Task whose result is the result of the Command protocol.</returns>
154-
[Obsolete("Use the newest overload instead.")]
155-
Task<TResult> CommandAsync<TResult>(
156-
DatabaseNamespace databaseNamespace,
157-
BsonDocument command,
158-
IElementNameValidator commandValidator,
159-
Func<CommandResponseHandling> responseHandling,
160-
bool secondaryOk,
161-
IBsonSerializer<TResult> resultSerializer,
162-
MessageEncoderSettings messageEncoderSettings,
163-
CancellationToken cancellationToken);
164-
165-
/// <summary>
166-
/// Executes a Command protocol.
167-
/// </summary>
168-
/// <typeparam name="TResult">The type of the result.</typeparam>
169-
/// <param name="session">The session.</param>
170-
/// <param name="readPreference">The read preference.</param>
171-
/// <param name="databaseNamespace">The database namespace.</param>
172-
/// <param name="command">The command.</param>
173-
/// <param name="commandValidator">The command validator.</param>
174-
/// <param name="additionalOptions">The additional options.</param>
175-
/// <param name="responseHandling">The response handling.</param>
176-
/// <param name="secondaryOk">if set to <c>true</c> sets the SecondaryOk bit to true in the command message sent to the server.</param>
177-
/// <param name="resultSerializer">The result serializer.</param>
178-
/// <param name="messageEncoderSettings">The message encoder settings.</param>
179-
/// <param name="cancellationToken">The cancellation token.</param>
180-
/// <returns>
181-
/// A Task whose result is the result of the Command protocol.
182-
/// </returns>
183-
[Obsolete("Use the newest overload instead.")]
184-
Task<TResult> CommandAsync<TResult>(
185-
ICoreSession session,
186-
ReadPreference readPreference,
187-
DatabaseNamespace databaseNamespace,
188-
BsonDocument command,
189-
IElementNameValidator commandValidator,
190-
BsonDocument additionalOptions,
191-
Func<CommandResponseHandling> responseHandling,
192-
bool secondaryOk,
193-
IBsonSerializer<TResult> resultSerializer,
194-
MessageEncoderSettings messageEncoderSettings,
195-
CancellationToken cancellationToken);
196-
19784
/// <summary>
19885
/// Executes a Command protocol.
19986
/// </summary>
@@ -227,96 +114,6 @@ Task<TResult> CommandAsync<TResult>(
227114
MessageEncoderSettings messageEncoderSettings,
228115
CancellationToken cancellationToken);
229116

230-
/// <summary>
231-
/// Executes a Delete protocol.
232-
/// </summary>
233-
/// <param name="collectionNamespace">The collection namespace.</param>
234-
/// <param name="query">The query.</param>
235-
/// <param name="isMulti">if set to <c>true</c> all matching documents are deleted.</param>
236-
/// <param name="messageEncoderSettings">The message encoder settings.</param>
237-
/// <param name="writeConcern">The write concern.</param>
238-
/// <param name="cancellationToken">The cancellation token.</param>
239-
/// <returns>The result of the Delete protocol.</returns>
240-
WriteConcernResult Delete(
241-
CollectionNamespace collectionNamespace,
242-
BsonDocument query,
243-
bool isMulti,
244-
MessageEncoderSettings messageEncoderSettings,
245-
WriteConcern writeConcern,
246-
CancellationToken cancellationToken);
247-
248-
/// <summary>
249-
/// Executes a Delete protocol.
250-
/// </summary>
251-
/// <param name="collectionNamespace">The collection namespace.</param>
252-
/// <param name="query">The query.</param>
253-
/// <param name="isMulti">if set to <c>true</c> all matching documents are deleted.</param>
254-
/// <param name="messageEncoderSettings">The message encoder settings.</param>
255-
/// <param name="writeConcern">The write concern.</param>
256-
/// <param name="cancellationToken">The cancellation token.</param>
257-
/// <returns>A Task whose result is the result of the Delete protocol.</returns>
258-
Task<WriteConcernResult> DeleteAsync(
259-
CollectionNamespace collectionNamespace,
260-
BsonDocument query,
261-
bool isMulti,
262-
MessageEncoderSettings messageEncoderSettings,
263-
WriteConcern writeConcern,
264-
CancellationToken cancellationToken);
265-
266-
/// <summary>
267-
/// Executes an Insert protocol.
268-
/// </summary>
269-
/// <typeparam name="TDocument">The type of the document.</typeparam>
270-
/// <param name="collectionNamespace">The collection namespace.</param>
271-
/// <param name="writeConcern">The write concern.</param>
272-
/// <param name="serializer">The serializer.</param>
273-
/// <param name="messageEncoderSettings">The message encoder settings.</param>
274-
/// <param name="documentSource">The document source.</param>
275-
/// <param name="maxBatchCount">The maximum batch count.</param>
276-
/// <param name="maxMessageSize">Maximum size of the message.</param>
277-
/// <param name="continueOnError">if set to <c>true</c> the server will continue with subsequent Inserts even if errors occur.</param>
278-
/// <param name="shouldSendGetLastError">A delegate that determines whether to piggy-back a GetLastError messsage with the Insert message.</param>
279-
/// <param name="cancellationToken">The cancellation token.</param>
280-
/// <returns>The result of the Insert protocol.</returns>
281-
WriteConcernResult Insert<TDocument>(
282-
CollectionNamespace collectionNamespace,
283-
WriteConcern writeConcern,
284-
IBsonSerializer<TDocument> serializer,
285-
MessageEncoderSettings messageEncoderSettings,
286-
BatchableSource<TDocument> documentSource,
287-
int? maxBatchCount,
288-
int? maxMessageSize,
289-
bool continueOnError,
290-
Func<bool> shouldSendGetLastError,
291-
CancellationToken cancellationToken);
292-
293-
/// <summary>
294-
/// Executes an Insert protocol.
295-
/// </summary>
296-
/// <typeparam name="TDocument">The type of the document.</typeparam>
297-
/// <param name="collectionNamespace">The collection namespace.</param>
298-
/// <param name="writeConcern">The write concern.</param>
299-
/// <param name="serializer">The serializer.</param>
300-
/// <param name="messageEncoderSettings">The message encoder settings.</param>
301-
/// <param name="documentSource">The document source.</param>
302-
/// <param name="maxBatchCount">The maximum batch count.</param>
303-
/// <param name="maxMessageSize">Maximum size of the message.</param>
304-
/// <param name="continueOnError">if set to <c>true</c> the server will continue with subsequent Inserts even if errors occur.</param>
305-
/// <param name="shouldSendGetLastError">A delegate that determines whether to piggy-back a GetLastError messsage with the Insert message.</param>
306-
/// <param name="cancellationToken">The cancellation token.</param>
307-
/// <returns>A Task whose result is the result of the Insert protocol.</returns>
308-
Task<WriteConcernResult> InsertAsync<TDocument>(
309-
CollectionNamespace collectionNamespace,
310-
WriteConcern writeConcern,
311-
IBsonSerializer<TDocument> serializer,
312-
MessageEncoderSettings messageEncoderSettings,
313-
BatchableSource<TDocument> documentSource,
314-
int? maxBatchCount,
315-
int? maxMessageSize,
316-
bool continueOnError,
317-
Func<bool> shouldSendGetLastError,
318-
CancellationToken cancellationToken);
319-
320117
/// <summary>
321118
/// Executes a Query protocol.
322119
/// </summary>
@@ -462,54 +259,6 @@ Task<CursorBatch<TDocument>> QueryAsync<TDocument>(
462259
IBsonSerializer<TDocument> serializer,
463260
MessageEncoderSettings messageEncoderSettings,
464261
CancellationToken cancellationToken);
465-
466-
/// <summary>
467-
/// Executes an Update protocol.
468-
/// </summary>
469-
/// <param name="collectionNamespace">The collection namespace.</param>
470-
/// <param name="messageEncoderSettings">The message encoder settings.</param>
471-
/// <param name="writeConcern">The write concern.</param>
472-
/// <param name="query">The query.</param>
473-
/// <param name="update">The update.</param>
474-
/// <param name="updateValidator">The update validator.</param>
475-
/// <param name="isMulti">if set to <c>true</c> the Update can affect multiple documents.</param>
476-
/// <param name="isUpsert">if set to <c>true</c> the document will be inserted if it is not found.</param>
477-
/// <param name="cancellationToken">The cancellation token.</param>
478-
/// <returns>The result of the Update protocol.</returns>
479-
WriteConcernResult Update(
480-
CollectionNamespace collectionNamespace,
481-
MessageEncoderSettings messageEncoderSettings,
482-
WriteConcern writeConcern,
483-
BsonDocument query,
484-
BsonDocument update,
485-
IElementNameValidator updateValidator,
486-
bool isMulti,
487-
bool isUpsert,
488-
CancellationToken cancellationToken);
489-
490-
/// <summary>
491-
/// Executes an Update protocol.
492-
/// </summary>
493-
/// <param name="collectionNamespace">The collection namespace.</param>
494-
/// <param name="messageEncoderSettings">The message encoder settings.</param>
495-
/// <param name="writeConcern">The write concern.</param>
496-
/// <param name="query">The query.</param>
497-
/// <param name="update">The update.</param>
498-
/// <param name="updateValidator">The update validator.</param>
499-
/// <param name="isMulti">if set to <c>true</c> the Update can affect multiple documents.</param>
500-
/// <param name="isUpsert">if set to <c>true</c> the document will be inserted if it is not found.</param>
501-
/// <param name="cancellationToken">The cancellation token.</param>
502-
/// <returns>A Task whose result is the result of the Update protocol.</returns>
503-
Task<WriteConcernResult> UpdateAsync(
504-
CollectionNamespace collectionNamespace,
505-
MessageEncoderSettings messageEncoderSettings,
506-
WriteConcern writeConcern,
507-
BsonDocument query,
508-
BsonDocument update,
509-
IElementNameValidator updateValidator,
510-
bool isMulti,
511-
bool isUpsert,
512-
CancellationToken cancellationToken);
513262
}
514263

515264
/// <summary>

0 commit comments

Comments
 (0)