Skip to content

Commit cfb847f

Browse files
authored
DOCSP-26223-track-variables (#24)
* DOCSP-26223-track-variables * JS PR fixes + collection name correction in images
1 parent bc2afb2 commit cfb847f

File tree

4 files changed

+41
-5
lines changed

4 files changed

+41
-5
lines changed

source/analyze-code.txt

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ To analyze your builder expressions in Visual Studio, perform the following acti
9999

100100
1. Install the {+product+} as described in the :ref:`Install <mongodb-analyzer-install>`
101101
guide.
102-
2. Write a builder expression with the {+driver-short+}
103-
3. Move your mouse over the :guilabel:`...` annotation beneath the first
102+
#. Write a builder expression with the {+driver-short+}
103+
#. Move your mouse over the :guilabel:`...` annotation beneath the first
104104
method of your builder expression to display an information message that contains
105105
the {+query-api+} translation.
106106

@@ -121,6 +121,28 @@ information message displayed:
121121
.. figure:: /includes/images/builder-popup-photoshop.png
122122
:alt: Screenshot of builder expression in visual studio with information message displayed.
123123

124+
The {+product+} supports builder variable tracking and composition. You can
125+
combine multiple builder expressions with `logical operators
126+
<https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/boolean-logical-operators>`__
127+
and view the {+query-api+} translation in the information message.
128+
129+
Click the following tabs to see a composed builder variable with and without an
130+
information message displayed:
131+
132+
.. tabs::
133+
134+
.. tab:: Without Information Message
135+
:tabid: no-message-variable
136+
137+
.. figure:: /includes/images/builder-variable.png
138+
:alt: Screenshot of builder expression variable in visual studio with ellipsis annotation.
139+
140+
.. tab:: With Information Message
141+
:tabid: message-variable
142+
143+
.. figure:: /includes/images/builder-variable-popup.png
144+
:alt: Screenshot of builder expression variable in visual studio with information message displayed.
145+
124146
.. include:: /includes/error-list-window.rst
125147

126148
.. We use this anchor in a DocHub link
@@ -153,7 +175,6 @@ and its corresponding {+query-api+} translation:
153175
OrderBy(m => m.Score).
154176
ToListAsync();
155177

156-
157178
.. tab:: {+query-api+}
158179
:tabid: query-api-linq
159180

@@ -175,8 +196,8 @@ To analyze your LINQ expressions in Visual Studio, perform the following actions
175196

176197
1. Install the {+product+} as described in the :ref:`Install <mongodb-analyzer-install>`
177198
guide.
178-
2. Write a LINQ expression with the {+driver-short+}.
179-
3. Move your mouse over the :guilabel:`...` annotation beneath the first
199+
#. Write a LINQ expression with the {+driver-short+}.
200+
#. Move your mouse over the :guilabel:`...` annotation beneath the first
180201
method of your LINQ expression to display an information message that contains
181202
the {+query-api+} translation.
182203

source/configuration.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,21 @@ by the {+product+}:
9595
| **Default**: ``"V2"``
9696
| **Accepted Values**: ``"V2"`` or ``"V3"``
9797

98+
* - | **EnableVariableTracking**
99+
- | **Type:** boolean
100+
|
101+
| **Description:**
102+
| Specifies if the {+product+} tracks and composes builder expression variables.
103+
104+
.. tip::
105+
106+
To learn more about builder expressions, see the
107+
:ref:`Analyze Your Code <mongodb-analyzer-analyze-builders>`
108+
page.
109+
110+
| **Default**: ``true``
111+
| **Accepted Values**: ``true`` or ``false``
112+
98113
* - | **OutputDriverVersion**
99114
- | **Type:** boolean
100115
|
Loading
103 KB
Loading

0 commit comments

Comments
 (0)