Skip to content

Commit d74a6f2

Browse files
committed
DOCSP-45799: code examples for fields update pages (#583)
* DOCSP-45799: code examples for fields update pages * update many page (cherry picked from commit aeedde7)
1 parent 9572cd2 commit d74a6f2

File tree

8 files changed

+835
-9
lines changed

8 files changed

+835
-9
lines changed

source/fundamentals/crud/write-operations/update-many.txt

+9-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,15 @@ Update Many
3636
.. replacement:: document-or-documents
3737

3838
documents
39-
39+
40+
.. replacement:: options-ref
41+
42+
.. _csharp-update-many-options:
43+
44+
.. replacement:: options-ref-link
45+
46+
:ref:`csharp-update-many-options`
47+
4048
.. replacement:: fields-link
4149

4250
:ref:`csharp-update-many-fields`

source/fundamentals/crud/write-operations/update-many/fields.txt

+201-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,204 @@ Update Fields in Many Documents
2525

2626
.. replacement:: update-page-link
2727

28-
:ref:`<csharp-update-many>`
28+
:ref:`csharp-update-many`
29+
30+
.. replacement:: matching-document-or-documents
31+
32+
all matching documents
33+
34+
.. replacement:: inc-code-example-tabs
35+
36+
.. tabs::
37+
38+
.. tab:: Synchronous
39+
:tabid: sync
40+
41+
.. literalinclude:: /includes/code-examples/update-many/UpdateManyFields.cs
42+
:language: csharp
43+
:copyable: true
44+
:dedent:
45+
:start-after: start-update-many-inc
46+
:end-before: end-update-many-inc
47+
48+
.. tab:: Asynchronous
49+
:tabid: async
50+
51+
.. literalinclude:: /includes/code-examples/update-many/UpdateManyFields.cs
52+
:language: csharp
53+
:copyable: true
54+
:dedent:
55+
:start-after: start-update-many-inc-async
56+
:end-before: end-update-many-inc-async
57+
58+
.. replacement:: mul-code-example-tabs
59+
60+
.. tabs::
61+
62+
.. tab:: Synchronous
63+
:tabid: sync
64+
65+
.. literalinclude:: /includes/code-examples/update-many/UpdateManyFields.cs
66+
:language: csharp
67+
:copyable: true
68+
:dedent:
69+
:start-after: start-update-many-mul
70+
:end-before: end-update-many-mul
71+
72+
.. tab:: Asynchronous
73+
:tabid: async
74+
75+
.. literalinclude:: /includes/code-examples/update-many/UpdateManyFields.cs
76+
:language: csharp
77+
:copyable: true
78+
:dedent:
79+
:start-after: start-update-many-mul-async
80+
:end-before: end-update-many-mul-async
81+
82+
.. replacement:: rename-code-example-tabs
83+
84+
.. tabs::
85+
86+
.. tab:: Synchronous
87+
:tabid: sync
88+
89+
.. literalinclude:: /includes/code-examples/update-many/UpdateManyFields.cs
90+
:language: csharp
91+
:copyable: true
92+
:dedent:
93+
:start-after: start-update-many-rename
94+
:end-before: end-update-many-rename
95+
96+
.. tab:: Asynchronous
97+
:tabid: async
98+
99+
.. literalinclude:: /includes/code-examples/update-many/UpdateManyFields.cs
100+
:language: csharp
101+
:copyable: true
102+
:dedent:
103+
:start-after: start-update-many-rename-async
104+
:end-before: end-update-many-rename-async
105+
106+
.. replacement:: set-code-example-tabs
107+
108+
.. tabs::
109+
110+
.. tab:: Synchronous
111+
:tabid: sync
112+
113+
.. literalinclude:: /includes/code-examples/update-many/UpdateManyFields.cs
114+
:language: csharp
115+
:copyable: true
116+
:dedent:
117+
:start-after: start-update-many-set
118+
:end-before: end-update-many-set
119+
120+
.. tab:: Asynchronous
121+
:tabid: async
122+
123+
.. literalinclude:: /includes/code-examples/update-many/UpdateManyFields.cs
124+
:language: csharp
125+
:copyable: true
126+
:dedent:
127+
:start-after: start-update-many-set-async
128+
:end-before: end-update-many-set-async
129+
130+
.. replacement:: max-code-example-tabs
131+
132+
.. tabs::
133+
134+
.. tab:: Synchronous
135+
:tabid: sync
136+
137+
.. literalinclude:: /includes/code-examples/update-many/UpdateManyFields.cs
138+
:language: csharp
139+
:copyable: true
140+
:dedent:
141+
:start-after: start-update-many-max
142+
:end-before: end-update-many-max
143+
144+
.. tab:: Asynchronous
145+
:tabid: async
146+
147+
.. literalinclude:: /includes/code-examples/update-many/UpdateManyFields.cs
148+
:language: csharp
149+
:copyable: true
150+
:dedent:
151+
:start-after: start-update-many-max-async
152+
:end-before: end-update-many-max-async
153+
154+
.. replacement:: setoninsert-code-example-tabs
155+
156+
.. tabs::
157+
158+
.. tab:: Synchronous
159+
:tabid: sync
160+
161+
.. literalinclude:: /includes/code-examples/update-many/UpdateManyFields.cs
162+
:language: csharp
163+
:copyable: true
164+
:dedent:
165+
:start-after: start-update-many-setoninsert
166+
:end-before: end-update-many-setoninsert
167+
168+
.. tab:: Asynchronous
169+
:tabid: async
170+
171+
.. literalinclude:: /includes/code-examples/update-many/UpdateManyFields.cs
172+
:language: csharp
173+
:copyable: true
174+
:dedent:
175+
:start-after: start-update-many-setoninsert-async
176+
:end-before: end-update-many-setoninsert-async
177+
178+
.. replacement:: options-ref-link
179+
180+
:ref:`csharp-update-many-options` in the Update Many guide
181+
182+
.. replacement:: currentdate-code-example-tabs
183+
184+
.. tabs::
185+
186+
.. tab:: Synchronous
187+
:tabid: sync
188+
189+
.. literalinclude:: /includes/code-examples/update-many/UpdateManyFields.cs
190+
:language: csharp
191+
:copyable: true
192+
:dedent:
193+
:start-after: start-update-many-currentdate
194+
:end-before: end-update-many-currentdate
195+
196+
.. tab:: Asynchronous
197+
:tabid: async
198+
199+
.. literalinclude:: /includes/code-examples/update-many/UpdateManyFields.cs
200+
:language: csharp
201+
:copyable: true
202+
:dedent:
203+
:start-after: start-update-many-currentdate-async
204+
:end-before: end-update-many-currentdate-async
205+
206+
.. replacement:: unset-code-example-tabs
207+
208+
.. tabs::
209+
210+
.. tab:: Synchronous
211+
:tabid: sync
212+
213+
.. literalinclude:: /includes/code-examples/update-many/UpdateManyFields.cs
214+
:language: csharp
215+
:copyable: true
216+
:dedent:
217+
:start-after: start-update-many-unset
218+
:end-before: end-update-many-unset
219+
220+
.. tab:: Asynchronous
221+
:tabid: async
222+
223+
.. literalinclude:: /includes/code-examples/update-many/UpdateManyFields.cs
224+
:language: csharp
225+
:copyable: true
226+
:dedent:
227+
:start-after: start-update-many-unset-async
228+
:end-before: end-update-many-unset-async

source/fundamentals/crud/write-operations/update-one.txt

+10-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,15 @@ Update One
3636
.. replacement:: document-or-documents
3737

3838
document
39-
39+
40+
.. replacement:: options-ref
41+
42+
.. _csharp-update-one-options:
43+
44+
.. replacement:: options-ref-link
45+
46+
:ref:`csharp-update-one-options`
47+
4048
.. replacement:: fields-link
4149

4250
:ref:`csharp-update-one-fields`
@@ -111,4 +119,4 @@ Update One
111119
:copyable: true
112120
:dedent:
113121
:start-after: // start-pipeline-async
114-
:end-before: // end-pipeline-async
122+
:end-before: // end-pipeline-async

0 commit comments

Comments
 (0)