Skip to content

Commit 1005873

Browse files
committed
CSHARP-2023: Rename ChangeStreamOutput to ChangeStreamDocument.
1 parent 15c7086 commit 1005873

21 files changed

+80
-78
lines changed

src/MongoDB.Driver.Core/ChangeStreamOutput.cs renamed to src/MongoDB.Driver.Core/ChangeStreamDocument.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace MongoDB.Driver
2121
/// <summary>
2222
/// An output document from a $changeStream pipeline stage.
2323
/// </summary>
24-
public sealed class ChangeStreamOutput<TDocument>
24+
public sealed class ChangeStreamDocument<TDocument>
2525
{
2626
// private fields
2727
private readonly CollectionNamespace _collectionNamespace;
@@ -33,15 +33,15 @@ public sealed class ChangeStreamOutput<TDocument>
3333

3434
// constructors
3535
/// <summary>
36-
/// Initializes a new instance of the <see cref="ChangeStreamOutput{TDocument}" /> class.
36+
/// Initializes a new instance of the <see cref="ChangeStreamDocument{TDocument}" /> class.
3737
/// </summary>
3838
/// <param name="resumeToken">The resume token.</param>
3939
/// <param name="operationType">Type of the operation.</param>
4040
/// <param name="collectionNamespace">Namespace of the collection.</param>
4141
/// <param name="documentKey">The document key.</param>
4242
/// <param name="updateDescription">The update description.</param>
4343
/// <param name="fullDocument">The full document.</param>
44-
public ChangeStreamOutput(
44+
public ChangeStreamDocument(
4545
BsonDocument resumeToken,
4646
ChangeStreamOperationType operationType,
4747
CollectionNamespace collectionNamespace,

src/MongoDB.Driver.Core/ChangeStreamOutputSerializer.cs renamed to src/MongoDB.Driver.Core/ChangeStreamDocumentSerializer.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ namespace MongoDB.Driver
2424
{
2525

2626
/// <summary>
27-
/// A serializer for ChangeStreamOutput instances.
27+
/// A serializer for ChangeStreamDocument instances.
2828
/// </summary>
2929
/// <typeparam name="TDocument">The type of the document.</typeparam>
30-
public class ChangeStreamOutputSerializer<TDocument> : SealedClassSerializerBase<ChangeStreamOutput<TDocument>>
30+
public class ChangeStreamDocumentSerializer<TDocument> : SealedClassSerializerBase<ChangeStreamDocument<TDocument>>
3131
{
3232
#region static
3333
// private static fields
@@ -40,18 +40,18 @@ public class ChangeStreamOutputSerializer<TDocument> : SealedClassSerializerBase
4040

4141
// constructors
4242
/// <summary>
43-
/// Initializes a new instance of the <see cref="ChangeStreamOutputSerializer{TDocument}"/> class.
43+
/// Initializes a new instance of the <see cref="ChangeStreamDocumentSerializer{TDocument}"/> class.
4444
/// </summary>
4545
/// <param name="documentSerializer">The document serializer.</param>
46-
public ChangeStreamOutputSerializer(
46+
public ChangeStreamDocumentSerializer(
4747
IBsonSerializer<TDocument> documentSerializer)
4848
{
4949
_documentSerializer = Ensure.IsNotNull(documentSerializer, nameof(documentSerializer));
5050
}
5151

5252
// public methods
5353
/// <inheritdoc />
54-
protected override ChangeStreamOutput<TDocument> DeserializeValue(BsonDeserializationContext context, BsonDeserializationArgs args)
54+
protected override ChangeStreamDocument<TDocument> DeserializeValue(BsonDeserializationContext context, BsonDeserializationArgs args)
5555
{
5656
var reader = context.Reader;
5757

@@ -106,7 +106,7 @@ protected override ChangeStreamOutput<TDocument> DeserializeValue(BsonDeserializ
106106
}
107107
reader.ReadEndDocument();
108108

109-
return new ChangeStreamOutput<TDocument>(
109+
return new ChangeStreamDocument<TDocument>(
110110
resumeToken,
111111
operationType.Value,
112112
collectionNamespace,
@@ -116,7 +116,7 @@ protected override ChangeStreamOutput<TDocument> DeserializeValue(BsonDeserializ
116116
}
117117

118118
/// <inheritdoc />
119-
protected override void SerializeValue(BsonSerializationContext context, BsonSerializationArgs args, ChangeStreamOutput<TDocument> value)
119+
protected override void SerializeValue(BsonSerializationContext context, BsonSerializationArgs args, ChangeStreamDocument<TDocument> value)
120120
{
121121
var writer = context.Writer;
122122
writer.WriteStartDocument();

src/MongoDB.Driver.Core/ChangeStreamFullDocumentOptions.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ public enum ChangeStreamFullDocumentOption
2525
/// </summary>
2626
Default = 0,
2727
/// <summary>
28-
/// Lookup the full document and return it.
28+
/// The change stream for partial updates will include both a delta describing the
29+
/// changes to the document as well as a copy of the entire document that was
30+
/// changed from some time after the change occurred.
2931
/// </summary>
3032
UpdateLookup
3133
}

src/MongoDB.Driver.Core/ChangeStreamUpdateDescription.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
namespace MongoDB.Driver
2020
{
2121
/// <summary>
22-
/// An UpdateDescription in a ChangeStreamOutput instance.
22+
/// An UpdateDescription in a ChangeStreamDocument instance.
2323
/// </summary>
2424
public sealed class ChangeStreamUpdateDescription
2525
{

src/MongoDB.Driver.Core/MongoDB.Driver.Core.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
<Compile Include="ChangeStreamFullDocumentOptions.cs" />
5555
<Compile Include="ChangeStreamOperationType.cs" />
5656
<Compile Include="ChangeStreamOperationTypeSerializer.cs" />
57-
<Compile Include="ChangeStreamOutput.cs" />
58-
<Compile Include="ChangeStreamOutputSerializer.cs" />
57+
<Compile Include="ChangeStreamDocument.cs" />
58+
<Compile Include="ChangeStreamDocumentSerializer.cs" />
5959
<Compile Include="ChangeStreamUpdateDescription.cs" />
6060
<Compile Include="ChangeStreamUpdateDescriptionSerializer.cs" />
6161
<Compile Include="Collation.cs" />

src/MongoDB.Driver/AggregateFluent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public override IAggregateFluent<TNewResult> BucketAuto<TValue, TNewResult>(
9898
return WithPipeline(_pipeline.BucketAuto(groupBy, buckets, output, options));
9999
}
100100

101-
public override IAggregateFluent<ChangeStreamOutput<TResult>> ChangeStream(ChangeStreamStageOptions options = null)
101+
public override IAggregateFluent<ChangeStreamDocument<TResult>> ChangeStream(ChangeStreamStageOptions options = null)
102102
{
103103
return WithPipeline(_pipeline.ChangeStream(options));
104104
}

src/MongoDB.Driver/AggregateFluentBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public virtual IAggregateFluent<TNewResult> BucketAuto<TValue, TNewResult>(
8686
}
8787

8888
/// <inheritdoc />
89-
public virtual IAggregateFluent<ChangeStreamOutput<TResult>> ChangeStream(ChangeStreamStageOptions options = null)
89+
public virtual IAggregateFluent<ChangeStreamDocument<TResult>> ChangeStream(ChangeStreamStageOptions options = null)
9090
{
9191
throw new NotImplementedException(); // implemented by subclasses
9292
}

src/MongoDB.Driver/IAggregateFluent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ IAggregateFluent<TNewResult> BucketAuto<TValue, TNewResult>(
129129
/// </summary>
130130
/// <param name="options">The options.</param>
131131
/// <returns>The fluent aggregate interface.</returns>
132-
IAggregateFluent<ChangeStreamOutput<TResult>> ChangeStream(ChangeStreamStageOptions options = null);
132+
IAggregateFluent<ChangeStreamDocument<TResult>> ChangeStream(ChangeStreamStageOptions options = null);
133133

134134
/// <summary>
135135
/// Appends a count stage to the pipeline.

src/MongoDB.Driver/IMongoCollection.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ public interface IMongoCollection<TDocument>
481481
/// A change stream.
482482
/// </returns>
483483
IAsyncCursor<TResult> Watch<TResult>(
484-
PipelineDefinition<ChangeStreamOutput<TDocument>, TResult> pipeline,
484+
PipelineDefinition<ChangeStreamDocument<TDocument>, TResult> pipeline,
485485
ChangeStreamOptions options = null,
486486
CancellationToken cancellationToken = default(CancellationToken));
487487

@@ -496,7 +496,7 @@ IAsyncCursor<TResult> Watch<TResult>(
496496
/// A change stream.
497497
/// </returns>
498498
Task<IAsyncCursor<TResult>> WatchAsync<TResult>(
499-
PipelineDefinition<ChangeStreamOutput<TDocument>, TResult> pipeline,
499+
PipelineDefinition<ChangeStreamDocument<TDocument>, TResult> pipeline,
500500
ChangeStreamOptions options = null,
501501
CancellationToken cancellationToken = default(CancellationToken));
502502

src/MongoDB.Driver/IMongoCollectionExtensions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,12 +1032,12 @@ public static IFindFluent<TDocument, TDocument> Find<TDocument>(this IMongoColle
10321032
/// <returns>
10331033
/// A change stream.
10341034
/// </returns>
1035-
public static IAsyncCursor<ChangeStreamOutput<TDocument>> Watch<TDocument>(
1035+
public static IAsyncCursor<ChangeStreamDocument<TDocument>> Watch<TDocument>(
10361036
this IMongoCollection<TDocument> collection,
10371037
ChangeStreamOptions options = null,
10381038
CancellationToken cancellationToken = default(CancellationToken))
10391039
{
1040-
var emptyPipeline = new EmptyPipelineDefinition<ChangeStreamOutput<TDocument>>();
1040+
var emptyPipeline = new EmptyPipelineDefinition<ChangeStreamDocument<TDocument>>();
10411041
return collection.Watch(emptyPipeline, options, cancellationToken);
10421042
}
10431043

@@ -1051,12 +1051,12 @@ public static IAsyncCursor<ChangeStreamOutput<TDocument>> Watch<TDocument>(
10511051
/// <returns>
10521052
/// A change stream.
10531053
/// </returns>
1054-
public static Task<IAsyncCursor<ChangeStreamOutput<TDocument>>> WatchAsync<TDocument>(
1054+
public static Task<IAsyncCursor<ChangeStreamDocument<TDocument>>> WatchAsync<TDocument>(
10551055
this IMongoCollection<TDocument> collection,
10561056
ChangeStreamOptions options = null,
10571057
CancellationToken cancellationToken = default(CancellationToken))
10581058
{
1059-
var emptyPipeline = new EmptyPipelineDefinition<ChangeStreamOutput<TDocument>>();
1059+
var emptyPipeline = new EmptyPipelineDefinition<ChangeStreamDocument<TDocument>>();
10601060
return collection.WatchAsync(emptyPipeline, options, cancellationToken);
10611061
}
10621062
}

0 commit comments

Comments
 (0)