From ca12a03f3f28e295a770c577d34d61976a8a91e5 Mon Sep 17 00:00:00 2001 From: Ferdinando Papale <4850119+papafe@users.noreply.github.com> Date: Mon, 14 Oct 2024 19:47:33 +0200 Subject: [PATCH] CSHARP-5316: Mark API as obsolete: Command + Channel (#1487) --- .../Core/Bindings/ChannelSourceHandle.cs | 1 + src/MongoDB.Driver.Core/Core/Bindings/IChannel.cs | 2 ++ src/MongoDB.Driver.Core/Core/Bindings/IChannelSource.cs | 2 ++ .../Core/Bindings/ServerChannelSource.cs | 1 + src/MongoDB.Driver.Core/Core/ChannelPinningHelper.cs | 2 ++ .../Core/WireProtocol/CommandResponseHandling.cs | 1 + src/MongoDB.Driver.Core/Core/WireProtocol/CursorBatch.cs | 2 ++ .../Core/WireProtocol/Messages/CommandMessage.cs | 1 + .../Core/WireProtocol/Messages/CommandMessageSection.cs | 6 ++++++ .../Core/WireProtocol/Messages/CommandRequestMessage.cs | 1 + .../Core/WireProtocol/Messages/CommandResponseMessage.cs | 1 + .../Core/WireProtocol/Messages/CompressedMessage.cs | 2 ++ .../Encoders/BinaryEncoders/BinaryMessageEncoderFactory.cs | 2 ++ .../Encoders/BinaryEncoders/CommandMessageBinaryEncoder.cs | 1 + .../BinaryEncoders/CommandRequestMessageBinaryEncoder.cs | 1 + .../BinaryEncoders/CommandResponseMessageBinaryEncoder.cs | 2 ++ .../BinaryEncoders/CompressedMessageBinaryEncoder.cs | 1 + .../Encoders/BinaryEncoders/MessageBinaryEncoderBase.cs | 1 + .../Encoders/BinaryEncoders/QueryMessageBinaryEncoder.cs | 1 + .../Encoders/BinaryEncoders/ReplyMessageBinaryEncoder.cs | 1 + .../Encoders/CommandResponseMessageEncoderSelector.cs | 3 +++ .../Messages/Encoders/CompressedMessageEncoderSelector.cs | 2 ++ .../WireProtocol/Messages/Encoders/IEncodableMessage.cs | 1 + .../Core/WireProtocol/Messages/Encoders/IMessageEncoder.cs | 1 + .../Messages/Encoders/IMessageEncoderFactory.cs | 2 ++ .../Messages/Encoders/IMessageEncoderPostProcessor.cs | 3 +++ .../Messages/Encoders/IMessageEncoderSelector.cs | 3 +++ .../Encoders/JsonEncoders/CommandMessageJsonEncoder.cs | 1 + .../JsonEncoders/CommandRequestMessageJsonEncoder.cs | 2 ++ .../JsonEncoders/CommandResponseMessageJsonEncoder.cs | 2 ++ .../Encoders/JsonEncoders/CompressedMessageJsonEncoder.cs | 1 + .../Encoders/JsonEncoders/JsonMessageEncoderFactory.cs | 2 ++ .../Encoders/JsonEncoders/MessageJsonEncoderBase.cs | 1 + .../Encoders/JsonEncoders/QueryMessageJsonEncoder.cs | 1 + .../Encoders/JsonEncoders/ReplyMessageJsonEncoder.cs | 1 + .../Messages/Encoders/MessageEncoderSettings.cs | 2 ++ .../Messages/Encoders/ReplyMessageEncoderSelector.cs | 2 ++ .../Core/WireProtocol/Messages/MongoDBMessage.cs | 1 + .../Core/WireProtocol/Messages/MongoDBMessageType.cs | 3 +++ .../Core/WireProtocol/Messages/QueryMessage.cs | 1 + .../Core/WireProtocol/Messages/ReplyMessage.cs | 1 + .../Core/WireProtocol/Messages/RequestMessage.cs | 1 + .../Core/WireProtocol/Messages/ResponseMessage.cs | 3 +++ 43 files changed, 72 insertions(+) diff --git a/src/MongoDB.Driver.Core/Core/Bindings/ChannelSourceHandle.cs b/src/MongoDB.Driver.Core/Core/Bindings/ChannelSourceHandle.cs index 86a132a1fcc..3ce94e88ad3 100644 --- a/src/MongoDB.Driver.Core/Core/Bindings/ChannelSourceHandle.cs +++ b/src/MongoDB.Driver.Core/Core/Bindings/ChannelSourceHandle.cs @@ -25,6 +25,7 @@ namespace MongoDB.Driver.Core.Bindings /// /// Represents a handle to a channel source. /// + [Obsolete("This class will be made internal in a later release.")] public sealed class ChannelSourceHandle : IChannelSourceHandle { // fields diff --git a/src/MongoDB.Driver.Core/Core/Bindings/IChannel.cs b/src/MongoDB.Driver.Core/Core/Bindings/IChannel.cs index b84d8f296d5..91ea0923e0e 100644 --- a/src/MongoDB.Driver.Core/Core/Bindings/IChannel.cs +++ b/src/MongoDB.Driver.Core/Core/Bindings/IChannel.cs @@ -30,6 +30,7 @@ namespace MongoDB.Driver.Core.Bindings /// /// Represents a channel (similar to a connection but operates at the level of protocols rather than messages). /// + [Obsolete("This interface will be made internal in a later release.")] public interface IChannel : IDisposable { /// @@ -264,6 +265,7 @@ Task> QueryAsync( /// /// Represents a handle to a channel. /// + [Obsolete("This interface will be made internal in a later release.")] public interface IChannelHandle : IChannel { /// diff --git a/src/MongoDB.Driver.Core/Core/Bindings/IChannelSource.cs b/src/MongoDB.Driver.Core/Core/Bindings/IChannelSource.cs index c7adc753c27..b1542ce376a 100644 --- a/src/MongoDB.Driver.Core/Core/Bindings/IChannelSource.cs +++ b/src/MongoDB.Driver.Core/Core/Bindings/IChannelSource.cs @@ -24,6 +24,7 @@ namespace MongoDB.Driver.Core.Bindings /// /// Represents a channel source. /// + [Obsolete("This interface will be made internal in a later release.")] public interface IChannelSource : IDisposable { /// @@ -68,6 +69,7 @@ public interface IChannelSource : IDisposable /// /// Represents a handle to a channel source. /// + [Obsolete("This interface will be made internal in a later release.")] public interface IChannelSourceHandle : IChannelSource { /// diff --git a/src/MongoDB.Driver.Core/Core/Bindings/ServerChannelSource.cs b/src/MongoDB.Driver.Core/Core/Bindings/ServerChannelSource.cs index 23c679205a2..fd3e46f8bd2 100644 --- a/src/MongoDB.Driver.Core/Core/Bindings/ServerChannelSource.cs +++ b/src/MongoDB.Driver.Core/Core/Bindings/ServerChannelSource.cs @@ -25,6 +25,7 @@ namespace MongoDB.Driver.Core.Bindings /// /// Represents a channel source that is bound to a server. /// + [Obsolete("This class will be made internal in a later release.")] public sealed class ServerChannelSource : IChannelSource { // fields diff --git a/src/MongoDB.Driver.Core/Core/ChannelPinningHelper.cs b/src/MongoDB.Driver.Core/Core/ChannelPinningHelper.cs index 12da1bafbc7..4b4cb91466c 100644 --- a/src/MongoDB.Driver.Core/Core/ChannelPinningHelper.cs +++ b/src/MongoDB.Driver.Core/Core/ChannelPinningHelper.cs @@ -13,6 +13,7 @@ * limitations under the License. */ +using System; using System.Threading; using MongoDB.Driver.Core.Bindings; using MongoDB.Driver.Core.Clusters; @@ -25,6 +26,7 @@ namespace MongoDB.Driver.Core /// /// Connection pinning helper. /// + [Obsolete("This class will be made internal in a later release.")] public static class ChannelPinningHelper { /// diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/CommandResponseHandling.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/CommandResponseHandling.cs index f14b9336cee..443b69b98b8 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/CommandResponseHandling.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/CommandResponseHandling.cs @@ -25,6 +25,7 @@ namespace MongoDB.Driver.Core.WireProtocol /// /// Instructions for handling the response from a command. /// + [Obsolete("This enum will be made internal in a later release.")] public enum CommandResponseHandling { /// diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/CursorBatch.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/CursorBatch.cs index 2b5c1d56805..34b70bac444 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/CursorBatch.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/CursorBatch.cs @@ -13,6 +13,7 @@ * limitations under the License. */ +using System; using System.Collections.Generic; using MongoDB.Bson; using MongoDB.Driver.Core.Misc; @@ -23,6 +24,7 @@ namespace MongoDB.Driver.Core.WireProtocol /// Represents one result batch (returned from either a Query or a GetMore message) /// /// The type of the document. + [Obsolete("This struct will be made internal in a later release.")] public struct CursorBatch { // fields diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/CommandMessage.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/CommandMessage.cs index 75c83ceb23a..34554ae2aa1 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/CommandMessage.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/CommandMessage.cs @@ -26,6 +26,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages /// Represents a command message. /// /// + [Obsolete("This class will be made internal in a later release.")] public sealed class CommandMessage : MongoDBMessage { // static diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/CommandMessageSection.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/CommandMessageSection.cs index 02c21f86554..da627a66f88 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/CommandMessageSection.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/CommandMessageSection.cs @@ -23,6 +23,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages /// /// Represents the payload type. /// + [Obsolete("This enum will be made internal in a later release.")] public enum PayloadType { /// @@ -38,6 +39,7 @@ public enum PayloadType /// /// Represents a CommandMessage section. /// + [Obsolete("This class will be made internal in a later release.")] public abstract class CommandMessageSection { /// @@ -53,6 +55,7 @@ public abstract class CommandMessageSection /// Represents a Type 0 CommandMessage section. /// /// + [Obsolete("This class will be made internal in a later release.")] public abstract class Type0CommandMessageSection : CommandMessageSection { // private fields @@ -98,6 +101,7 @@ public Type0CommandMessageSection(object document, IBsonSerializer documentSeria /// /// The type of the document. /// + [Obsolete("This class will be made internal in a later release.")] public sealed class Type0CommandMessageSection : Type0CommandMessageSection { // private fields @@ -139,6 +143,7 @@ public Type0CommandMessageSection(TDocument document, IBsonSerializer /// /// Represents a Type 1 CommandMessage section. /// + [Obsolete("This class will be made internal in a later release.")] public abstract class Type1CommandMessageSection : CommandMessageSection { // private fields @@ -241,6 +246,7 @@ public Type1CommandMessageSection( /// /// The type of the document. /// + [Obsolete("This class will be made internal in a later release.")] public class Type1CommandMessageSection : Type1CommandMessageSection where TDocument : class { // private fields diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/CommandRequestMessage.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/CommandRequestMessage.cs index 1699f6229cb..bc2a96251d1 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/CommandRequestMessage.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/CommandRequestMessage.cs @@ -27,6 +27,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages /// Represents a command request message. /// /// + [Obsolete("This class will be made internal in a later release.")] public class CommandRequestMessage : RequestMessage { // private fields diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/CommandResponseMessage.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/CommandResponseMessage.cs index 15c003ff80d..07ddd30cd90 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/CommandResponseMessage.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/CommandResponseMessage.cs @@ -27,6 +27,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages /// Represents a command response message. /// /// + [Obsolete("This class will be made internal in a later release.")] public class CommandResponseMessage : ResponseMessage { // private fields diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/CompressedMessage.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/CompressedMessage.cs index 2d83724fb75..06e1f8eaa87 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/CompressedMessage.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/CompressedMessage.cs @@ -13,6 +13,7 @@ * limitations under the License. */ +using System; using MongoDB.Bson.IO; using MongoDB.Driver.Core.Compression; using MongoDB.Driver.Core.Misc; @@ -23,6 +24,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages /// /// Represents a compressed message. /// + [Obsolete("This class will be made internal in a later release.")] public class CompressedMessage : MongoDBMessage { private readonly CompressorType _compressorType; diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/BinaryMessageEncoderFactory.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/BinaryMessageEncoderFactory.cs index 10e4c8cb500..0f57d4c6209 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/BinaryMessageEncoderFactory.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/BinaryMessageEncoderFactory.cs @@ -13,6 +13,7 @@ * limitations under the License. */ +using System; using System.IO; using MongoDB.Bson.Serialization; using MongoDB.Driver.Core.Compression; @@ -23,6 +24,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders.BinaryEncoders /// /// Represents a factory for binary message encoders. /// + [Obsolete("This class will be made internal in a later release.")] public class BinaryMessageEncoderFactory : IMessageEncoderFactory { // fields diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/CommandMessageBinaryEncoder.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/CommandMessageBinaryEncoder.cs index 90da1e3e042..e131e95a7c5 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/CommandMessageBinaryEncoder.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/CommandMessageBinaryEncoder.cs @@ -31,6 +31,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders.BinaryEncoders /// /// /// + [Obsolete("This class will be made internal in a later release.")] public class CommandMessageBinaryEncoder : MessageBinaryEncoderBase, IMessageEncoder { // constructors diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/CommandRequestMessageBinaryEncoder.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/CommandRequestMessageBinaryEncoder.cs index 55587b34095..d435819ccd1 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/CommandRequestMessageBinaryEncoder.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/CommandRequestMessageBinaryEncoder.cs @@ -23,6 +23,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders.BinaryEncoders /// Represents a binary encoder for a CommandRequestMessage. /// /// + [Obsolete("This class will be made internal in a later release.")] public class CommandRequestMessageBinaryEncoder : IMessageEncoder { // private fields diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/CommandResponseMessageBinaryEncoder.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/CommandResponseMessageBinaryEncoder.cs index e74ea8c2897..85fe522b94d 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/CommandResponseMessageBinaryEncoder.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/CommandResponseMessageBinaryEncoder.cs @@ -13,6 +13,7 @@ * limitations under the License. */ +using System; using MongoDB.Driver.Core.Misc; namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders.BinaryEncoders @@ -21,6 +22,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders.BinaryEncoders /// Represents a binary encoder for a CommandResponseMessage. /// /// + [Obsolete("This class will be made internal in a later release.")] public class CommandResponseMessageBinaryEncoder : IMessageEncoder { // private fields diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/CompressedMessageBinaryEncoder.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/CompressedMessageBinaryEncoder.cs index 4c05da03fcb..3d137b241e9 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/CompressedMessageBinaryEncoder.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/CompressedMessageBinaryEncoder.cs @@ -24,6 +24,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders.BinaryEncoders /// /// Represents a binary encoder for a compressed message. /// + [Obsolete("This class will be made internal in a later release.")] public sealed class CompressedMessageBinaryEncoder : MessageBinaryEncoderBase, IMessageEncoder { private readonly ICompressorSource _compressorSource; diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/MessageBinaryEncoderBase.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/MessageBinaryEncoderBase.cs index 6d1e505afa9..3d3e07a84a2 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/MessageBinaryEncoderBase.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/MessageBinaryEncoderBase.cs @@ -28,6 +28,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders.BinaryEncoders /// /// Represents a base class for binary message encoders. /// + [Obsolete("This class will be made internal in a later release.")] public abstract class MessageBinaryEncoderBase { // fields diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/QueryMessageBinaryEncoder.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/QueryMessageBinaryEncoder.cs index f5a526ae031..bfd8c15d816 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/QueryMessageBinaryEncoder.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/QueryMessageBinaryEncoder.cs @@ -26,6 +26,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders.BinaryEncoders /// /// Represents a binary encoder for a Query message. /// + [Obsolete("This class will be made internal in a later release.")] public class QueryMessageBinaryEncoder : MessageBinaryEncoderBase, IMessageEncoder { // constructors diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/ReplyMessageBinaryEncoder.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/ReplyMessageBinaryEncoder.cs index 3bf8a44d3e3..f0c609c16f8 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/ReplyMessageBinaryEncoder.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/BinaryEncoders/ReplyMessageBinaryEncoder.cs @@ -28,6 +28,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders.BinaryEncoders /// Represents a binary encoder for a Reply message. /// /// The type of the documents. + [Obsolete("This class will be made internal in a later release.")] public class ReplyMessageBinaryEncoder : MessageBinaryEncoderBase, IMessageEncoder { // fields diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/CommandResponseMessageEncoderSelector.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/CommandResponseMessageEncoderSelector.cs index c583123ab6c..77b7f36c51a 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/CommandResponseMessageEncoderSelector.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/CommandResponseMessageEncoderSelector.cs @@ -13,11 +13,14 @@ * limitations under the License. */ +using System; + namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders { /// /// Represents a message encoder selector for CommandResponseMessages. /// + [Obsolete("This class will be made internal in a later release.")] public class CommandResponseMessageEncoderSelector : IMessageEncoderSelector { // public methods diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/CompressedMessageEncoderSelector.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/CompressedMessageEncoderSelector.cs index a7b53e240b7..e2b91f81839 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/CompressedMessageEncoderSelector.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/CompressedMessageEncoderSelector.cs @@ -13,6 +13,7 @@ * limitations under the License. */ +using System; using MongoDB.Driver.Core.Misc; namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders @@ -20,6 +21,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders /// /// Represents a message encoder selector for compressed messages. /// + [Obsolete("This class will be made internal in a later release.")] public class CompressedMessageEncoderSelector : IMessageEncoderSelector { private readonly IMessageEncoderSelector _originalEncoderSelector; diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/IEncodableMessage.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/IEncodableMessage.cs index bae364108e4..8f74e28eb62 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/IEncodableMessage.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/IEncodableMessage.cs @@ -24,6 +24,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders /// /// Represents an encodable message. /// + [Obsolete("This interface will be made internal in a later release.")] public interface IEncodableMessage { // methods diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/IMessageEncoder.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/IMessageEncoder.cs index 250bf58c084..7f5a5290d80 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/IMessageEncoder.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/IMessageEncoder.cs @@ -24,6 +24,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders /// /// Represents a message encoder. /// + [Obsolete("This interface will be made internal in a later release.")] public interface IMessageEncoder { /// diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/IMessageEncoderFactory.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/IMessageEncoderFactory.cs index 24b66f6dabe..84485ca2e03 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/IMessageEncoderFactory.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/IMessageEncoderFactory.cs @@ -13,6 +13,7 @@ * limitations under the License. */ +using System; using MongoDB.Bson.Serialization; namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders @@ -20,6 +21,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders /// /// Represents a message encoder factory. /// + [Obsolete("This interface will be made internal in a later release.")] public interface IMessageEncoderFactory { /// diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/IMessageEncoderPostProcessor.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/IMessageEncoderPostProcessor.cs index d1443f9f917..2dd18e79f11 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/IMessageEncoderPostProcessor.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/IMessageEncoderPostProcessor.cs @@ -13,11 +13,14 @@ * limitations under the License. */ +using System; + namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders { /// /// Represents the changes that can be made to a message after it has been encoded. /// + [Obsolete("This interface will be made internal in a later release.")] public interface IMessageEncoderPostProcessor { /// diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/IMessageEncoderSelector.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/IMessageEncoderSelector.cs index 0bf53cf69b0..aa285085bc4 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/IMessageEncoderSelector.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/IMessageEncoderSelector.cs @@ -13,11 +13,14 @@ * limitations under the License. */ +using System; + namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders { /// /// Represents a message encoder selector that gets the appropriate encoder from an encoder factory. /// + [Obsolete("This interface will be made internal in a later release.")] public interface IMessageEncoderSelector { // methods diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/CommandMessageJsonEncoder.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/CommandMessageJsonEncoder.cs index 77f901e624e..2cb7d21bce7 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/CommandMessageJsonEncoder.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/CommandMessageJsonEncoder.cs @@ -30,6 +30,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders.JsonEncoders /// /// /// + [Obsolete("This class will be made internal in a later release.")] public class CommandMessageJsonEncoder : MessageJsonEncoderBase, IMessageEncoder { /// diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/CommandRequestMessageJsonEncoder.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/CommandRequestMessageJsonEncoder.cs index 47e98deb451..c660fd60932 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/CommandRequestMessageJsonEncoder.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/CommandRequestMessageJsonEncoder.cs @@ -13,6 +13,7 @@ * limitations under the License. */ +using System; using MongoDB.Driver.Core.Misc; namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders.JsonEncoders @@ -21,6 +22,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders.JsonEncoders /// Represents a Json encoder for a CommandRequestMessage. /// /// + [Obsolete("This class will be made internal in a later release.")] public class CommandRequestMessageJsonEncoder : IMessageEncoder { // private fields diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/CommandResponseMessageJsonEncoder.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/CommandResponseMessageJsonEncoder.cs index 798b5a21362..dff1840a1b5 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/CommandResponseMessageJsonEncoder.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/CommandResponseMessageJsonEncoder.cs @@ -13,6 +13,7 @@ * limitations under the License. */ +using System; using MongoDB.Driver.Core.Misc; namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders.JsonEncoders @@ -21,6 +22,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders.JsonEncoders /// Represents a Json encoder for a CommandResponseMessage. /// /// + [Obsolete("This class will be made internal in a later release.")] public class CommandResponseMessageJsonEncoder : IMessageEncoder { // private fields diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/CompressedMessageJsonEncoder.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/CompressedMessageJsonEncoder.cs index c44ce580920..542c09dfcde 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/CompressedMessageJsonEncoder.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/CompressedMessageJsonEncoder.cs @@ -28,6 +28,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders.JsonEncoders /// Represents a Json encoder for a CompressedMessage. /// /// + [Obsolete("This class will be made internal in a later release.")] public class CompressedMessageJsonEncoder : MessageJsonEncoderBase, IMessageEncoder { private readonly MessageEncoderSettings _encoderSettings; diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/JsonMessageEncoderFactory.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/JsonMessageEncoderFactory.cs index d967ab08093..593d30fdf54 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/JsonMessageEncoderFactory.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/JsonMessageEncoderFactory.cs @@ -13,6 +13,7 @@ * limitations under the License. */ +using System; using System.IO; using MongoDB.Bson.Serialization; using MongoDB.Driver.Core.Misc; @@ -22,6 +23,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders.JsonEncoders /// /// Represents a factory for JSON message encoders. /// + [Obsolete("This class will be made internal in a later release.")] public class JsonMessageEncoderFactory : IMessageEncoderFactory { // fields diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/MessageJsonEncoderBase.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/MessageJsonEncoderBase.cs index ed4663f3d07..42a44bd933a 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/MessageJsonEncoderBase.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/MessageJsonEncoderBase.cs @@ -24,6 +24,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders.JsonEncoders /// /// Represents a base class for JSON message encoders. /// + [Obsolete("This class will be made internal in a later release.")] public abstract class MessageJsonEncoderBase { // fields diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/QueryMessageJsonEncoder.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/QueryMessageJsonEncoder.cs index 9878af1968c..101e0eba591 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/QueryMessageJsonEncoder.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/QueryMessageJsonEncoder.cs @@ -26,6 +26,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders.JsonEncoders /// /// Represents a JSON encoder for a Query message. /// + [Obsolete("This class will be made internal in a later release.")] public class QueryMessageJsonEncoder : MessageJsonEncoderBase, IMessageEncoder { // constructors diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/ReplyMessageJsonEncoder.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/ReplyMessageJsonEncoder.cs index c011b73a9fe..99dbbf1be27 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/ReplyMessageJsonEncoder.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/JsonEncoders/ReplyMessageJsonEncoder.cs @@ -31,6 +31,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders.JsonEncoders /// Represents a JSON encoder for a Reply message. /// /// The type of the documents. + [Obsolete("This class will be made internal in a later release.")] public class ReplyMessageJsonEncoder : MessageJsonEncoderBase, IMessageEncoder { // fields diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/MessageEncoderSettings.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/MessageEncoderSettings.cs index 97a043600a7..66315d66053 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/MessageEncoderSettings.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/MessageEncoderSettings.cs @@ -22,6 +22,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders /// /// Represents the names of different encoder settings. /// + [Obsolete("This class will be made internal in a later release.")] public static class MessageEncoderSettingsName { // encoder settings used by the binary encoders @@ -118,6 +119,7 @@ public static class MessageEncoderSettingsName /// /// Represents settings for message encoders. /// + [Obsolete("This class will be made internal in a later release.")] public class MessageEncoderSettings : IEnumerable> { // fields diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/ReplyMessageEncoderSelector.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/ReplyMessageEncoderSelector.cs index 9858dd0e880..f8277377f5a 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/ReplyMessageEncoderSelector.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/Encoders/ReplyMessageEncoderSelector.cs @@ -13,6 +13,7 @@ * limitations under the License. */ +using System; using MongoDB.Bson.Serialization; using MongoDB.Driver.Core.Misc; @@ -22,6 +23,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages.Encoders /// Represents a message encoder selector for ReplyMessages. /// /// The type of the document. + [Obsolete("This class will be made internal in a later release.")] public class ReplyMessageEncoderSelector : IMessageEncoderSelector { // fields diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/MongoDBMessage.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/MongoDBMessage.cs index d463bc88882..a0c7cce1419 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/MongoDBMessage.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/MongoDBMessage.cs @@ -25,6 +25,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages /// /// Represents a base class for messages. /// + [Obsolete("This class will be made internal in a later release.")] public abstract class MongoDBMessage : IEncodableMessage { // properties diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/MongoDBMessageType.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/MongoDBMessageType.cs index 07289fabcaf..a885264e532 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/MongoDBMessageType.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/MongoDBMessageType.cs @@ -14,11 +14,14 @@ */ +using System; + namespace MongoDB.Driver.Core.WireProtocol.Messages { /// /// Represents the type of message. /// + [Obsolete("This enum will be made internal in a later release.")] public enum MongoDBMessageType { /// diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/QueryMessage.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/QueryMessage.cs index 918c3dc1571..70e125bbb74 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/QueryMessage.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/QueryMessage.cs @@ -25,6 +25,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages /// /// Represents a Query message. /// + [Obsolete("This class will be made internal in a later release.")] public class QueryMessage : RequestMessage { // fields diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/ReplyMessage.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/ReplyMessage.cs index 4b4affdf1c9..4e7bc907a24 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/ReplyMessage.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/ReplyMessage.cs @@ -31,6 +31,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages /// Represents a Reply message. /// /// The type of the document. + [Obsolete("This class will be made internal in a later release.")] public class ReplyMessage : ResponseMessage { // fields diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/RequestMessage.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/RequestMessage.cs index 4003f0c7925..bdbdc07999c 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/RequestMessage.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/RequestMessage.cs @@ -21,6 +21,7 @@ namespace MongoDB.Driver.Core.WireProtocol.Messages /// /// Represents a base class for request messages. /// + [Obsolete("This class will be made internal in a later release.")] public abstract class RequestMessage : MongoDBMessage { #region static diff --git a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/ResponseMessage.cs b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/ResponseMessage.cs index d427b6c9e30..7e3590b98ad 100644 --- a/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/ResponseMessage.cs +++ b/src/MongoDB.Driver.Core/Core/WireProtocol/Messages/ResponseMessage.cs @@ -13,11 +13,14 @@ * limitations under the License. */ +using System; + namespace MongoDB.Driver.Core.WireProtocol.Messages { /// /// Represents a base class for response messages. /// + [Obsolete("This class will be made internal in a later release.")] public abstract class ResponseMessage : MongoDBMessage { // fields