@@ -146,42 +146,28 @@ Unsupported LINQ Expressions
146
146
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
147
147
148
148
If your LINQ expression is not supported, the {+product-short+} outputs a
149
- ``NotSupportedLinqExpression `` warning.
149
+ ``MALinq2001 `` warning.
150
150
151
- Click the following tabs to see a code snippet containing an unsupported LINQ expression
152
- and the corresponding warning message displayed by the {+product-short+} :
151
+ The following code snippet contains the unsupported ``GetHashCode`` LINQ
152
+ expression :
153
153
154
- .. tabs::
155
-
156
- .. tab:: Code Snippet
157
- :tabid: code-snippet
158
-
159
- The following code snippet contains the unsupported ``GetHashCode`` LINQ expression:
160
-
161
- .. code-block:: csharp
162
-
163
- var result = queryableColl.Where(b => b.GetHashCode() == 167);
164
-
165
- The following screenshot shows the annotation displayed by the {+product-short+}
166
- underneath the preceding code snippet in Visual Studio:
167
-
168
- .. figure:: /includes/images/linq-unsupported.png
169
- :alt: Screenshot of annotation beneath unsupported LINQ expression
154
+ .. code-block:: csharp
170
155
171
- .. tab:: Warning
172
- :tabid: warning
156
+ var result = queryableColl.Where(b => b.GetHashCode() == 167);
173
157
174
- The following is the warning generated by the {+product-short+}:
158
+ The {+product-short+} shows an annotation on the unsupported expression
159
+ and generates the following warning message:
175
160
176
- .. code-block:: text
177
- :copyable: false
161
+ .. code-block:: text
162
+ :copyable: false
178
163
179
- Expression not supported: b.GetHashCode().
164
+ Expression not supported: b.GetHashCode().
180
165
181
- The following screenshot shows the warning displayed in Visual Studio:
166
+ The following screenshot shows the annotated code and the warning
167
+ displayed when you hover over the annotation:
182
168
183
- .. figure:: /includes/images/linq-unsupported-popup.png
184
- :alt: Screenshot of warning displayed in Visual Studio from unsupported LINQ.
169
+ .. figure:: /includes/images/linq-unsupported-popup.png
170
+ :alt: Screenshot of warning displayed in Visual Studio from unsupported LINQ.
185
171
186
172
.. include:: /includes/error-list-window.rst
187
173
@@ -225,4 +211,4 @@ provider. To learn how to configure your LINQ provider, see the
225
211
226
212
To view examples of expressions the {+driver-short+} only supports with the LINQ3 provider, see the
227
213
`{+product+} Github repository
228
- <{+product-source-repo+}/blob/main/tests/MongoDB.Analyzer.Tests.Common.TestCases/Linq/NotSupportedLinq2.cs>`__.
214
+ <{+product-source-repo+}/blob/main/tests/MongoDB.Analyzer.Tests.Common.TestCases/Linq/NotSupportedLinq2.cs>`__.
0 commit comments