Skip to content

Commit a12bf39

Browse files
authored
CSHARP-5288: Make types internal in Operations namespace (#1458)
1 parent cfe2417 commit a12bf39

28 files changed

+116
-941
lines changed

apidocs/api/index.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,9 @@
8989
<a href="xref:MongoDB.Driver.Core.Misc"></a>
9090
: [!INCLUDE[summary](../namespaces/MongoDB.Driver/MongoDB.Driver.Core.Misc.md)]
9191

92-
<a href="xref:MongoDB.Driver.Core.Operations"></a>
93-
: [!INCLUDE[summary](../namespaces/MongoDB.Driver/MongoDB.Driver.Core.Operations.md)]
94-
9592
<a href="xref:MongoDB.Driver.Core.Servers"></a>
9693
: [!INCLUDE[summary](../namespaces/MongoDB.Driver/MongoDB.Driver.Core.Servers.md)]
9794

98-
<a href="xref:MongoDB.Driver.Core.Operations"></a>
99-
: [!INCLUDE[summary](../namespaces/MongoDB.Driver/MongoDB.Driver.Core.Operations.md)]
100-
10195
<a href="xref:MongoDB.Driver.Core.WireProtocol"></a>
10296
: [!INCLUDE[summary](../namespaces/MongoDB.Driver/MongoDB.Driver.Core.WireProtocol.md)]
10397

apidocs/namespaces/MongoDB.Driver/MongoDB.Driver.Core.Operations.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/MongoDB.Driver/Core/Operations/BulkWriteConcernError.cs

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,8 @@
2020

2121
namespace MongoDB.Driver.Core.Operations
2222
{
23-
/// <summary>
24-
/// Represents the details of a write concern error.
25-
/// </summary>
2623
[Serializable]
27-
public sealed class BulkWriteConcernError
24+
internal sealed class BulkWriteConcernError
2825
{
2926
// fields
3027
private readonly int _code;
@@ -34,37 +31,16 @@ public sealed class BulkWriteConcernError
3431
private readonly string _message;
3532

3633
// constructors
37-
/// <summary>
38-
/// Initializes a new instance of the <see cref="BulkWriteConcernError"/> class.
39-
/// </summary>
40-
/// <param name="code">The code.</param>
41-
/// <param name="message">The message.</param>
42-
/// <param name="details">The details.</param>
4334
public BulkWriteConcernError(int code, string message, BsonDocument details)
4435
: this(code, null, message, details)
4536
{
4637
}
4738

48-
/// <summary>
49-
/// Initializes a new instance of the <see cref="BulkWriteConcernError" /> class.
50-
/// </summary>
51-
/// <param name="code">The code.</param>
52-
/// <param name="codeName">The name of the code.</param>
53-
/// <param name="message">The message.</param>
54-
/// <param name="details">The details.</param>
5539
public BulkWriteConcernError(int code, string codeName, string message, BsonDocument details)
5640
: this(code, codeName, message, details, new string[0])
5741
{
5842
}
5943

60-
/// <summary>
61-
/// Initializes a new instance of the <see cref="BulkWriteConcernError" /> class.
62-
/// </summary>
63-
/// <param name="code">The code.</param>
64-
/// <param name="codeName">The name of the code.</param>
65-
/// <param name="message">The message.</param>
66-
/// <param name="details">The details.</param>
67-
/// <param name="errorLabels">The error labels.</param>
6844
public BulkWriteConcernError(int code, string codeName, string message, BsonDocument details, IEnumerable<string> errorLabels)
6945
{
7046
_code = code;
@@ -75,56 +51,26 @@ public BulkWriteConcernError(int code, string codeName, string message, BsonDocu
7551
}
7652

7753
// properties
78-
/// <summary>
79-
/// Gets the error code.
80-
/// </summary>
81-
/// <value>
82-
/// The error code.
83-
/// </value>
8454
public int Code
8555
{
8656
get { return _code; }
8757
}
8858

89-
/// <summary>
90-
/// Gets the name of the error code.
91-
/// </summary>
92-
/// <value>
93-
/// The name of the error code.
94-
/// </value>
9559
public string CodeName
9660
{
9761
get { return _codeName; }
9862
}
9963

100-
/// <summary>
101-
/// Gets the error details.
102-
/// </summary>
103-
/// <value>
104-
/// The error details.
105-
/// </value>
10664
public BsonDocument Details
10765
{
10866
get { return _details; }
10967
}
11068

111-
/// <summary>
112-
/// Gets the error labels.
113-
/// </summary>
114-
/// <value>
115-
/// The error labels.
116-
/// </value>
11769
public IEnumerable<string> ErrorLabels
11870
{
11971
get { return _errorLabels; }
12072
}
12173

122-
/// <summary>
123-
/// Gets the error message.
124-
/// </summary>
125-
/// <value>
126-
/// The error message.
127-
/// </value>
12874
public string Message
12975
{
13076
get { return _message; }

src/MongoDB.Driver/Core/Operations/BulkWriteOperationError.cs

Lines changed: 2 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,8 @@
1919

2020
namespace MongoDB.Driver.Core.Operations
2121
{
22-
/// <summary>
23-
/// Represents the details of a write error for a particular request.
24-
/// </summary>
2522
[Serializable]
26-
public sealed class BulkWriteOperationError
23+
internal sealed class BulkWriteOperationError
2724
{
2825
// fields
2926
private readonly int _code;
@@ -32,13 +29,6 @@ public sealed class BulkWriteOperationError
3229
private readonly string _message;
3330

3431
// constructors
35-
/// <summary>
36-
/// Initializes a new instance of the <see cref="BulkWriteOperationError"/> class.
37-
/// </summary>
38-
/// <param name="index">The index.</param>
39-
/// <param name="code">The code.</param>
40-
/// <param name="message">The message.</param>
41-
/// <param name="details">The details.</param>
4232
public BulkWriteOperationError(int index, int code, string message, BsonDocument details)
4333
{
4434
_code = code;
@@ -48,12 +38,6 @@ public BulkWriteOperationError(int index, int code, string message, BsonDocument
4838
}
4939

5040
// properties
51-
/// <summary>
52-
/// Gets the error category.
53-
/// </summary>
54-
/// <value>
55-
/// The error category.
56-
/// </value>
5741
public ServerErrorCategory Category
5842
{
5943
get
@@ -72,52 +56,28 @@ public ServerErrorCategory Category
7256
}
7357
}
7458

75-
/// <summary>
76-
/// Gets the error code.
77-
/// </summary>
78-
/// <value>
79-
/// The error code.
80-
/// </value>
8159
public int Code
8260
{
8361
get { return _code; }
8462
}
8563

86-
/// <summary>
87-
/// Gets the error details.
88-
/// </summary>
89-
/// <value>
90-
/// The error details.
91-
/// </value>
9264
public BsonDocument Details
9365
{
9466
get { return _details; }
9567
}
9668

97-
/// <summary>
98-
/// Gets the index of the request that had an error.
99-
/// </summary>
100-
/// <value>
101-
/// The index.
102-
/// </value>
10369
public int Index
10470
{
10571
get { return _index; }
10672
}
10773

108-
/// <summary>
109-
/// Gets the error message.
110-
/// </summary>
111-
/// <value>
112-
/// The error message.
113-
/// </value>
11474
public string Message
11575
{
11676
get { return _message; }
11777
}
11878

11979
// methods
120-
internal BulkWriteOperationError WithMappedIndex(IndexMap indexMap)
80+
public BulkWriteOperationError WithMappedIndex(IndexMap indexMap)
12181
{
12282
var mappedIndex = indexMap.Map(_index);
12383
return (_index == mappedIndex) ? this : new BulkWriteOperationError(mappedIndex, Code, Message, Details);

0 commit comments

Comments
 (0)