diff --git a/source/MongoDB.Tests/IntegrationTests/Connections/TestConnection.cs b/source/MongoDB.Tests/IntegrationTests/Connections/TestConnection.cs index c33d2b6c..c5c0a861 100644 --- a/source/MongoDB.Tests/IntegrationTests/Connections/TestConnection.cs +++ b/source/MongoDB.Tests/IntegrationTests/Connections/TestConnection.cs @@ -24,7 +24,7 @@ private void WriteBadMessage(Connection conn) writer.Write((byte)0); } - protected QueryMessage GenerateQueryMessage() + private QueryMessage GenerateQueryMessage() { var qdoc = new Document {{"listDatabases", 1.0}}; //QueryMessage qmsg = new QueryMessage(qdoc,"system.namespaces"); diff --git a/source/MongoDB/Protocol/DeleteMessage.cs b/source/MongoDB/Protocol/DeleteMessage.cs index 97ae7277..d734387d 100644 --- a/source/MongoDB/Protocol/DeleteMessage.cs +++ b/source/MongoDB/Protocol/DeleteMessage.cs @@ -14,7 +14,7 @@ namespace MongoDB.Protocol /// BSON selector; // query object. See below for details. /// } /// - public class DeleteMessage : RequestMessageBase + internal class DeleteMessage : RequestMessageBase { /// /// Initializes a new instance of the class. diff --git a/source/MongoDB/Protocol/GetMoreMessage.cs b/source/MongoDB/Protocol/GetMoreMessage.cs index 39e75881..eea3fc36 100644 --- a/source/MongoDB/Protocol/GetMoreMessage.cs +++ b/source/MongoDB/Protocol/GetMoreMessage.cs @@ -14,7 +14,7 @@ namespace MongoDB.Protocol /// int64 cursorID; // cursorID from the OP_REPLY /// } /// - public class GetMoreMessage : RequestMessageBase + internal class GetMoreMessage : RequestMessageBase { /// /// Initializes a new instance of the class. diff --git a/source/MongoDB/Protocol/IRequestMessage.cs b/source/MongoDB/Protocol/IRequestMessage.cs index 1e159b69..d944afa6 100644 --- a/source/MongoDB/Protocol/IRequestMessage.cs +++ b/source/MongoDB/Protocol/IRequestMessage.cs @@ -5,7 +5,7 @@ namespace MongoDB.Protocol /// /// A Message that is to be written to the database. /// - public interface IRequestMessage + internal interface IRequestMessage { /// /// Writes the specified stream. diff --git a/source/MongoDB/Protocol/InsertMessage.cs b/source/MongoDB/Protocol/InsertMessage.cs index 7db25e0c..241f8dc1 100644 --- a/source/MongoDB/Protocol/InsertMessage.cs +++ b/source/MongoDB/Protocol/InsertMessage.cs @@ -16,7 +16,7 @@ namespace MongoDB.Protocol /// BSON[] documents; // one or more documents to insert into the collection /// } /// - public class InsertMessage : MessageBase, IRequestMessage + internal class InsertMessage : MessageBase, IRequestMessage { private readonly BsonWriterSettings _bsonWriterSettings; private readonly List _chunks = new List(); diff --git a/source/MongoDB/Protocol/KillCursorsMessage.cs b/source/MongoDB/Protocol/KillCursorsMessage.cs index f4877445..2a8214d9 100644 --- a/source/MongoDB/Protocol/KillCursorsMessage.cs +++ b/source/MongoDB/Protocol/KillCursorsMessage.cs @@ -15,7 +15,7 @@ namespace MongoDB.Protocol /// int64[] cursorIDs; // array of cursorIDs to close /// } /// - public class KillCursorsMessage : RequestMessageBase + internal class KillCursorsMessage : RequestMessageBase { /// /// Initializes a new instance of the class. diff --git a/source/MongoDB/Protocol/MessageBase.cs b/source/MongoDB/Protocol/MessageBase.cs index fe6e25ed..dfdc8c28 100644 --- a/source/MongoDB/Protocol/MessageBase.cs +++ b/source/MongoDB/Protocol/MessageBase.cs @@ -3,7 +3,7 @@ namespace MongoDB.Protocol /// /// Base class for all raw messages /// - public abstract class MessageBase + internal abstract class MessageBase { /// /// diff --git a/source/MongoDB/Protocol/MessageHeader.cs b/source/MongoDB/Protocol/MessageHeader.cs index 84a999e5..55c2b576 100644 --- a/source/MongoDB/Protocol/MessageHeader.cs +++ b/source/MongoDB/Protocol/MessageHeader.cs @@ -14,7 +14,7 @@ namespace MongoDB.Protocol /// int32 opCode; // request type - see table below /// } /// - public class MessageHeader + internal class MessageHeader { /// /// Initializes a new instance of the class. diff --git a/source/MongoDB/Protocol/MsgMessage.cs b/source/MongoDB/Protocol/MsgMessage.cs index 28e41f47..391e48a7 100644 --- a/source/MongoDB/Protocol/MsgMessage.cs +++ b/source/MongoDB/Protocol/MsgMessage.cs @@ -12,7 +12,7 @@ namespace MongoDB.Protocol /// cstring message; // message for the database /// } /// - public class MsgMessage : RequestMessageBase + internal class MsgMessage : RequestMessageBase { /// /// Initializes a new instance of the class. diff --git a/source/MongoDB/Protocol/OpCode.cs b/source/MongoDB/Protocol/OpCode.cs index e5ca816e..a83bebf9 100644 --- a/source/MongoDB/Protocol/OpCode.cs +++ b/source/MongoDB/Protocol/OpCode.cs @@ -1,44 +1,44 @@ namespace MongoDB.Protocol { /// - /// /// - public enum OpCode{ + internal enum OpCode + { /// - /// Reply to a client request. responseTo is set. + /// Reply to a client request. responseTo is set. /// Reply = 1, /// - /// Generic msg command followed by a string. + /// Generic msg command followed by a string. /// Msg = 1000, /// - /// update document + /// update document /// Update = 2001, /// - /// insert new document + /// insert new document /// Insert = 2002, /// - /// is this used? + /// is this used? /// GetByOid = 2003, /// - /// query a collection + /// query a collection /// Query = 2004, /// - /// Get more data from a query. See Cursors. + /// Get more data from a query. See Cursors. /// GetMore = 2005, /// - /// Delete documents + /// Delete documents /// Delete = 2006, /// - /// Tell database client is done with a cursor. + /// Tell database client is done with a cursor. /// - KillCursors = 2007 + KillCursors = 2007 } } \ No newline at end of file diff --git a/source/MongoDB/Protocol/QueryMessage.cs b/source/MongoDB/Protocol/QueryMessage.cs index d9ef58d4..25ffb433 100644 --- a/source/MongoDB/Protocol/QueryMessage.cs +++ b/source/MongoDB/Protocol/QueryMessage.cs @@ -17,7 +17,7 @@ namespace MongoDB.Protocol /// [ BSON returnFieldSelector; ] // OPTIONAL : selector indicating the fields to return. See below for details. /// } /// - public class QueryMessage : RequestMessageBase + internal class QueryMessage : RequestMessageBase { /// /// Initializes a new instance of the class. diff --git a/source/MongoDB/Protocol/ReplyMessage.cs b/source/MongoDB/Protocol/ReplyMessage.cs index d1577929..c7207b3d 100644 --- a/source/MongoDB/Protocol/ReplyMessage.cs +++ b/source/MongoDB/Protocol/ReplyMessage.cs @@ -19,7 +19,7 @@ namespace MongoDB.Protocol /// BSON[] documents; // documents /// } /// - public class ReplyMessage : MessageBase where T : class + internal class ReplyMessage : MessageBase where T : class { private readonly BsonReaderSettings _readerSettings; diff --git a/source/MongoDB/Protocol/RequestMessageBase.cs b/source/MongoDB/Protocol/RequestMessageBase.cs index 11864467..c557202d 100644 --- a/source/MongoDB/Protocol/RequestMessageBase.cs +++ b/source/MongoDB/Protocol/RequestMessageBase.cs @@ -7,7 +7,7 @@ namespace MongoDB.Protocol /// /// Description of Message. /// - public abstract class RequestMessageBase : MessageBase, IRequestMessage + internal abstract class RequestMessageBase : MessageBase, IRequestMessage { private readonly BsonWriterSettings _bsonWriterSettings; diff --git a/source/MongoDB/Protocol/UpdateMessage.cs b/source/MongoDB/Protocol/UpdateMessage.cs index 8495a8aa..7ee9ccb9 100644 --- a/source/MongoDB/Protocol/UpdateMessage.cs +++ b/source/MongoDB/Protocol/UpdateMessage.cs @@ -15,7 +15,7 @@ namespace MongoDB.Protocol /// BSON document; // the document data to update with or insert /// } /// - public class UpdateMessage : RequestMessageBase + internal class UpdateMessage : RequestMessageBase { /// /// Initializes a new instance of the class.