Skip to content

Commit ca12a03

Browse files
authored
CSHARP-5316: Mark API as obsolete: Command + Channel (#1487)
1 parent 8aec7ab commit ca12a03

Some content is hidden

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

43 files changed

+72
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ namespace MongoDB.Driver.Core.Bindings
2525
/// <summary>
2626
/// Represents a handle to a channel source.
2727
/// </summary>
28+
[Obsolete("This class will be made internal in a later release.")]
2829
public sealed class ChannelSourceHandle : IChannelSourceHandle
2930
{
3031
// fields

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ namespace MongoDB.Driver.Core.Bindings
3030
/// <summary>
3131
/// Represents a channel (similar to a connection but operates at the level of protocols rather than messages).
3232
/// </summary>
33+
[Obsolete("This interface will be made internal in a later release.")]
3334
public interface IChannel : IDisposable
3435
{
3536
/// <summary>
@@ -264,6 +265,7 @@ Task<CursorBatch<TDocument>> QueryAsync<TDocument>(
264265
/// <summary>
265266
/// Represents a handle to a channel.
266267
/// </summary>
268+
[Obsolete("This interface will be made internal in a later release.")]
267269
public interface IChannelHandle : IChannel
268270
{
269271
/// <summary>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ namespace MongoDB.Driver.Core.Bindings
2424
/// <summary>
2525
/// Represents a channel source.
2626
/// </summary>
27+
[Obsolete("This interface will be made internal in a later release.")]
2728
public interface IChannelSource : IDisposable
2829
{
2930
/// <summary>
@@ -68,6 +69,7 @@ public interface IChannelSource : IDisposable
6869
/// <summary>
6970
/// Represents a handle to a channel source.
7071
/// </summary>
72+
[Obsolete("This interface will be made internal in a later release.")]
7173
public interface IChannelSourceHandle : IChannelSource
7274
{
7375
/// <summary>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ namespace MongoDB.Driver.Core.Bindings
2525
/// <summary>
2626
/// Represents a channel source that is bound to a server.
2727
/// </summary>
28+
[Obsolete("This class will be made internal in a later release.")]
2829
public sealed class ServerChannelSource : IChannelSource
2930
{
3031
// fields

src/MongoDB.Driver.Core/Core/ChannelPinningHelper.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* limitations under the License.
1414
*/
1515

16+
using System;
1617
using System.Threading;
1718
using MongoDB.Driver.Core.Bindings;
1819
using MongoDB.Driver.Core.Clusters;
@@ -25,6 +26,7 @@ namespace MongoDB.Driver.Core
2526
/// <summary>
2627
/// Connection pinning helper.
2728
/// </summary>
29+
[Obsolete("This class will be made internal in a later release.")]
2830
public static class ChannelPinningHelper
2931
{
3032
/// <summary>

src/MongoDB.Driver.Core/Core/WireProtocol/CommandResponseHandling.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ namespace MongoDB.Driver.Core.WireProtocol
2525
/// <summary>
2626
/// Instructions for handling the response from a command.
2727
/// </summary>
28+
[Obsolete("This enum will be made internal in a later release.")]
2829
public enum CommandResponseHandling
2930
{
3031
/// <summary>

src/MongoDB.Driver.Core/Core/WireProtocol/CursorBatch.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* limitations under the License.
1414
*/
1515

16+
using System;
1617
using System.Collections.Generic;
1718
using MongoDB.Bson;
1819
using MongoDB.Driver.Core.Misc;
@@ -23,6 +24,7 @@ namespace MongoDB.Driver.Core.WireProtocol
2324
/// Represents one result batch (returned from either a Query or a GetMore message)
2425
/// </summary>
2526
/// <typeparam name="TDocument">The type of the document.</typeparam>
27+
[Obsolete("This struct will be made internal in a later release.")]
2628
public struct CursorBatch<TDocument>
2729
{
2830
// fields

src/MongoDB.Driver.Core/Core/WireProtocol/Messages/CommandMessage.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages
2626
/// Represents a command message.
2727
/// </summary>
2828
/// <seealso cref="MongoDB.Driver.Core.WireProtocol.Messages.MongoDBMessage" />
29+
[Obsolete("This class will be made internal in a later release.")]
2930
public sealed class CommandMessage : MongoDBMessage
3031
{
3132
// static

src/MongoDB.Driver.Core/Core/WireProtocol/Messages/CommandMessageSection.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages
2323
/// <summary>
2424
/// Represents the payload type.
2525
/// </summary>
26+
[Obsolete("This enum will be made internal in a later release.")]
2627
public enum PayloadType
2728
{
2829
/// <summary>
@@ -38,6 +39,7 @@ public enum PayloadType
3839
/// <summary>
3940
/// Represents a CommandMessage section.
4041
/// </summary>
42+
[Obsolete("This class will be made internal in a later release.")]
4143
public abstract class CommandMessageSection
4244
{
4345
/// <summary>
@@ -53,6 +55,7 @@ public abstract class CommandMessageSection
5355
/// Represents a Type 0 CommandMessage section.
5456
/// </summary>
5557
/// <seealso cref="MongoDB.Driver.Core.WireProtocol.Messages.CommandMessageSection" />
58+
[Obsolete("This class will be made internal in a later release.")]
5659
public abstract class Type0CommandMessageSection : CommandMessageSection
5760
{
5861
// private fields
@@ -98,6 +101,7 @@ public Type0CommandMessageSection(object document, IBsonSerializer documentSeria
98101
/// </summary>
99102
/// <typeparam name="TDocument">The type of the document.</typeparam>
100103
/// <seealso cref="MongoDB.Driver.Core.WireProtocol.Messages.Type0CommandMessageSection" />
104+
[Obsolete("This class will be made internal in a later release.")]
101105
public sealed class Type0CommandMessageSection<TDocument> : Type0CommandMessageSection
102106
{
103107
// private fields
@@ -139,6 +143,7 @@ public Type0CommandMessageSection(TDocument document, IBsonSerializer<TDocument>
139143
/// <summary>
140144
/// Represents a Type 1 CommandMessage section.
141145
/// </summary>
146+
[Obsolete("This class will be made internal in a later release.")]
142147
public abstract class Type1CommandMessageSection : CommandMessageSection
143148
{
144149
// private fields
@@ -241,6 +246,7 @@ public Type1CommandMessageSection(
241246
/// </summary>
242247
/// <typeparam name="TDocument">The type of the document.</typeparam>
243248
/// <seealso cref="MongoDB.Driver.Core.WireProtocol.Messages.CommandMessageSection" />
249+
[Obsolete("This class will be made internal in a later release.")]
244250
public class Type1CommandMessageSection<TDocument> : Type1CommandMessageSection where TDocument : class
245251
{
246252
// private fields

src/MongoDB.Driver.Core/Core/WireProtocol/Messages/CommandRequestMessage.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages
2727
/// Represents a command request message.
2828
/// </summary>
2929
/// <seealso cref="MongoDB.Driver.Core.WireProtocol.Messages.RequestMessage" />
30+
[Obsolete("This class will be made internal in a later release.")]
3031
public class CommandRequestMessage : RequestMessage
3132
{
3233
// private fields

0 commit comments

Comments
 (0)