27
27
28
28
namespace MongoDB . Driver . Core . Bindings
29
29
{
30
- /// <summary>
31
- /// Represents a channel (similar to a connection but operates at the level of protocols rather than messages).
32
- /// </summary>
33
- public interface IChannel : IDisposable
30
+ internal interface IChannel : IDisposable
34
31
{
35
- /// <summary>
36
- /// Gets the connection.
37
- /// </summary>
38
- /// <value>
39
- /// The connection.
40
- /// </value>
41
32
IConnectionHandle Connection { get ; }
42
-
43
- /// <summary>
44
- /// Gets the connection description.
45
- /// </summary>
46
- /// <value>
47
- /// The connection description.
48
- /// </value>
49
33
ConnectionDescription ConnectionDescription { get ; }
50
34
51
- /// <summary>
52
- /// Executes a Command protocol.
53
- /// </summary>
54
- /// <typeparam name="TResult">The type of the result.</typeparam>
55
- /// <param name="session">The session.</param>
56
- /// <param name="readPreference">The read preference.</param>
57
- /// <param name="databaseNamespace">The database namespace.</param>
58
- /// <param name="command">The command.</param>
59
- /// <param name="commandPayloads">The command payloads.</param>
60
- /// <param name="commandValidator">The command validator.</param>
61
- /// <param name="additionalOptions">The additional options.</param>
62
- /// <param name="postWriteAction">The post write action.</param>
63
- /// <param name="responseHandling">The response handling.</param>
64
- /// <param name="resultSerializer">The result serializer.</param>
65
- /// <param name="messageEncoderSettings">The message encoder settings.</param>
66
- /// <param name="cancellationToken">The cancellation token.</param>
67
- /// <returns>
68
- /// The result of the Command protocol.
69
- /// </returns>
70
35
TResult Command < TResult > (
71
36
ICoreSession session ,
72
37
ReadPreference readPreference ,
@@ -81,25 +46,6 @@ TResult Command<TResult>(
81
46
MessageEncoderSettings messageEncoderSettings ,
82
47
CancellationToken cancellationToken ) ;
83
48
84
- /// <summary>
85
- /// Executes a Command protocol.
86
- /// </summary>
87
- /// <typeparam name="TResult">The type of the result.</typeparam>
88
- /// <param name="session">The session.</param>
89
- /// <param name="readPreference">The read preference.</param>
90
- /// <param name="databaseNamespace">The database namespace.</param>
91
- /// <param name="command">The command.</param>
92
- /// <param name="commandPayloads">The command payloads.</param>
93
- /// <param name="commandValidator">The command validator.</param>
94
- /// <param name="additionalOptions">The additional options.</param>
95
- /// <param name="postWriteAction">The post write action.</param>
96
- /// <param name="responseHandling">The response handling.</param>
97
- /// <param name="resultSerializer">The result serializer.</param>
98
- /// <param name="messageEncoderSettings">The message encoder settings.</param>
99
- /// <param name="cancellationToken">The cancellation token.</param>
100
- /// <returns>
101
- /// A Task whose result is the result of the Command protocol.
102
- /// </returns>
103
49
Task < TResult > CommandAsync < TResult > (
104
50
ICoreSession session ,
105
51
ReadPreference readPreference ,
@@ -114,25 +60,6 @@ Task<TResult> CommandAsync<TResult>(
114
60
MessageEncoderSettings messageEncoderSettings ,
115
61
CancellationToken cancellationToken ) ;
116
62
117
- /// <summary>
118
- /// Executes a Query protocol.
119
- /// </summary>
120
- /// <typeparam name="TDocument">The type of the document.</typeparam>
121
- /// <param name="collectionNamespace">The collection namespace.</param>
122
- /// <param name="query">The query.</param>
123
- /// <param name="fields">The fields.</param>
124
- /// <param name="queryValidator">The query validator.</param>
125
- /// <param name="skip">The number of documents to skip.</param>
126
- /// <param name="batchSize">The size of a batch.</param>
127
- /// <param name="secondaryOk">if set to <c>true</c> sets the SecondaryOk bit to true in the query message sent to the server.</param>
128
- /// <param name="partialOk">if set to <c>true</c> the server is allowed to return partial results if any shards are unavailable.</param>
129
- /// <param name="noCursorTimeout">if set to <c>true</c> the server will not timeout the cursor.</param>
130
- /// <param name="tailableCursor">if set to <c>true</c> the query should return a tailable cursor.</param>
131
- /// <param name="awaitData">if set to <c>true</c> the server should await awhile before returning an empty batch for a tailable cursor.</param>
132
- /// <param name="serializer">The serializer.</param>
133
- /// <param name="messageEncoderSettings">The message encoder settings.</param>
134
- /// <param name="cancellationToken">The cancellation token.</param>
135
- /// <returns>The result of the Insert protocol.</returns>
136
63
CursorBatch < TDocument > Query < TDocument > (
137
64
CollectionNamespace collectionNamespace ,
138
65
BsonDocument query ,
@@ -149,26 +76,6 @@ CursorBatch<TDocument> Query<TDocument>(
149
76
MessageEncoderSettings messageEncoderSettings ,
150
77
CancellationToken cancellationToken ) ;
151
78
152
- /// <summary>
153
- /// Executes a Query protocol.
154
- /// </summary>
155
- /// <typeparam name="TDocument">The type of the document.</typeparam>
156
- /// <param name="collectionNamespace">The collection namespace.</param>
157
- /// <param name="query">The query.</param>
158
- /// <param name="fields">The fields.</param>
159
- /// <param name="queryValidator">The query validator.</param>
160
- /// <param name="skip">The number of documents to skip.</param>
161
- /// <param name="batchSize">The size of a batch.</param>
162
- /// <param name="secondaryOk">if set to <c>true</c> sets the SecondaryOk bit to true in the query message sent to the server.</param>
163
- /// <param name="partialOk">if set to <c>true</c> the server is allowed to return partial results if any shards are unavailable.</param>
164
- /// <param name="noCursorTimeout">if set to <c>true</c> the server will not timeout the cursor.</param>
165
- /// <param name="oplogReplay">if set to <c>true</c> the OplogReplay bit will be set.</param>
166
- /// <param name="tailableCursor">if set to <c>true</c> the query should return a tailable cursor.</param>
167
- /// <param name="awaitData">if set to <c>true</c> the server should await awhile before returning an empty batch for a tailable cursor.</param>
168
- /// <param name="serializer">The serializer.</param>
169
- /// <param name="messageEncoderSettings">The message encoder settings.</param>
170
- /// <param name="cancellationToken">The cancellation token.</param>
171
- /// <returns>The result of the Insert protocol.</returns>
172
79
[ Obsolete ( "Use an overload that does not have an oplogReplay parameter instead." ) ]
173
80
CursorBatch < TDocument > Query < TDocument > (
174
81
CollectionNamespace collectionNamespace ,
@@ -187,25 +94,6 @@ CursorBatch<TDocument> Query<TDocument>(
187
94
MessageEncoderSettings messageEncoderSettings ,
188
95
CancellationToken cancellationToken ) ;
189
96
190
- /// <summary>
191
- /// Executes a Query protocol.
192
- /// </summary>
193
- /// <typeparam name="TDocument">The type of the document.</typeparam>
194
- /// <param name="collectionNamespace">The collection namespace.</param>
195
- /// <param name="query">The query.</param>
196
- /// <param name="fields">The fields.</param>
197
- /// <param name="queryValidator">The query validator.</param>
198
- /// <param name="skip">The number of documents to skip.</param>
199
- /// <param name="batchSize">The size of a batch.</param>
200
- /// <param name="secondaryOk">if set to <c>true</c> sets the SecondaryOk bit to true in the query message sent to the server.</param>
201
- /// <param name="partialOk">if set to <c>true</c> the server is allowed to return partial results if any shards are unavailable.</param>
202
- /// <param name="noCursorTimeout">if set to <c>true</c> the server will not timeout the cursor.</param>
203
- /// <param name="tailableCursor">if set to <c>true</c> the query should return a tailable cursor.</param>
204
- /// <param name="awaitData">if set to <c>true</c> the server should await awhile before returning an empty batch for a tailable cursor.</param>
205
- /// <param name="serializer">The serializer.</param>
206
- /// <param name="messageEncoderSettings">The message encoder settings.</param>
207
- /// <param name="cancellationToken">The cancellation token.</param>
208
- /// <returns>A Task whose result is the result of the Insert protocol.</returns>
209
97
Task < CursorBatch < TDocument > > QueryAsync < TDocument > (
210
98
CollectionNamespace collectionNamespace ,
211
99
BsonDocument query ,
@@ -222,26 +110,6 @@ Task<CursorBatch<TDocument>> QueryAsync<TDocument>(
222
110
MessageEncoderSettings messageEncoderSettings ,
223
111
CancellationToken cancellationToken ) ;
224
112
225
- /// <summary>
226
- /// Executes a Query protocol.
227
- /// </summary>
228
- /// <typeparam name="TDocument">The type of the document.</typeparam>
229
- /// <param name="collectionNamespace">The collection namespace.</param>
230
- /// <param name="query">The query.</param>
231
- /// <param name="fields">The fields.</param>
232
- /// <param name="queryValidator">The query validator.</param>
233
- /// <param name="skip">The number of documents to skip.</param>
234
- /// <param name="batchSize">The size of a batch.</param>
235
- /// <param name="secondaryOk">if set to <c>true</c> sets the SecondaryOk bit to true in the query message sent to the server.</param>
236
- /// <param name="partialOk">if set to <c>true</c> the server is allowed to return partial results if any shards are unavailable.</param>
237
- /// <param name="noCursorTimeout">if set to <c>true</c> the server will not timeout the cursor.</param>
238
- /// <param name="oplogReplay">if set to <c>true</c> the OplogReplay bit will be set.</param>
239
- /// <param name="tailableCursor">if set to <c>true</c> the query should return a tailable cursor.</param>
240
- /// <param name="awaitData">if set to <c>true</c> the server should await awhile before returning an empty batch for a tailable cursor.</param>
241
- /// <param name="serializer">The serializer.</param>
242
- /// <param name="messageEncoderSettings">The message encoder settings.</param>
243
- /// <param name="cancellationToken">The cancellation token.</param>
244
- /// <returns>A Task whose result is the result of the Insert protocol.</returns>
245
113
[ Obsolete ( "Use an overload that does not have an oplogReplay parameter instead." ) ]
246
114
Task < CursorBatch < TDocument > > QueryAsync < TDocument > (
247
115
CollectionNamespace collectionNamespace ,
@@ -261,15 +129,8 @@ Task<CursorBatch<TDocument>> QueryAsync<TDocument>(
261
129
CancellationToken cancellationToken ) ;
262
130
}
263
131
264
- /// <summary>
265
- /// Represents a handle to a channel.
266
- /// </summary>
267
- public interface IChannelHandle : IChannel
132
+ internal interface IChannelHandle : IChannel
268
133
{
269
- /// <summary>
270
- /// Returns a new handle to the underlying channel.
271
- /// </summary>
272
- /// <returns>A channel handle.</returns>
273
134
IChannelHandle Fork ( ) ;
274
135
}
275
136
}
0 commit comments