Skip to content

Commit d5a4ec8

Browse files
adjust wording of options and fix typos
1 parent 6852bdb commit d5a4ec8

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

source/fundamentals/crud/read-operations/change-streams.txt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ classes:
6565
- ``Collection``: To monitor changes in the collection
6666

6767
The following example opens a change stream on the ``restaurants`` collection
68-
and outputs the type of changes as they occur. Select the
68+
and outputs the operation type of changes as they occur. Select the
6969
:guilabel:`Asynchronous` or :guilabel:`Synchronous` tab to see the corresponding
7070
code.
7171

@@ -233,22 +233,23 @@ Include Pre-Images and Post-Images
233233
By default, when you perform an operation on a collection, the
234234
corresponding change event includes only the delta of the fields
235235
modified by that operation. To see the full document before or after a
236-
change, specify the ``FullDocumentBeforeChange`` or the ``FullDocument``
237-
parameters in the ``Watch()`` or ``WatchAsync()`` method.
236+
change, create a ``ChangeStreamOptions`` object and specify the
237+
``FullDocumentBeforeChange`` or the ``FullDocument`` options. Then, pass the
238+
``ChangeStreamOptions`` object to the ``Watch()`` or ``WatchAsync()`` method.
238239

239240
The **pre-image** is the full version of a document *before* a change. To include the
240241
pre-image in the change stream event, set the ``FullDocumentBeforeChange``
241-
parameter to one of the following values:
242+
option to one of the following values:
242243

243244
- ``ChangeStreamFullDocumentBeforeChangeOption.WhenAvailable``: The change event
244245
includes a pre-image of the modified document for change events only if the
245246
pre-image is available.
246-
- ``ChangeStreamFullDocumentBeforeChangeOption.ChangeStreamFullDocumentOption.Required``:
247+
- ``ChangeStreamFullDocumentBeforeChangeOption.Required``:
247248
The change event includes a pre-image of the modified document for change
248249
events. If the pre-image is not available, the driver raises an error.
249250

250251
The **post-image** is the full version of a document *after* a change. To include the
251-
post-image in the change stream event, set the ``full_document`` parameter to
252+
post-image in the change stream event, set the ``FullDocument`` option to
252253
one of the following values:
253254

254255
- ``ChangeStreamFullDocumentOption.UpdateLookup``: The change event includes a
@@ -261,7 +262,7 @@ one of the following values:
261262
not available, the driver raises an error.
262263

263264
The following example opens a change stream on a collection and includes the post-image
264-
of updated documents by specifying the ``FullDocument`` parameter. Select the
265+
of updated documents by specifying the ``FullDocument`` option. Select the
265266
:guilabel:`Asynchronous` or :guilabel:`Synchronous` tab to see the corresponding
266267
code.
267268

source/includes/code-examples/change-streams/change-streams.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ await cursor.ForEachAsync(change =>
6767

6868
// start-change-stream-post-image
6969
var pipeline = new EmptyPipelineDefinition<ChangeStreamDocument<Restaurant>>()
70-
.Match(change => change.OperationType == ChangeStreamOperationType.Update);
70+
.Match(change => change.OperationType == ChangeStreamOperationType.Update);
7171

7272
var options = new ChangeStreamOptions
7373
{
@@ -85,7 +85,7 @@ await cursor.ForEachAsync(change =>
8585

8686
// start-change-stream-post-image-async
8787
var pipeline = new EmptyPipelineDefinition<ChangeStreamDocument<Restaurant>>()
88-
.Match(change => change.OperationType == ChangeStreamOperationType.Update);
88+
.Match(change => change.OperationType == ChangeStreamOperationType.Update);
8989

9090
var options = new ChangeStreamOptions
9191
{

0 commit comments

Comments
 (0)