You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Filter problematic 'await' keyword suggestions from Razor completion.
The `await` completion item is not compatible with all Razor scenarios.
The `await` completion has been made smarter in that it will now update the containing method signature to include `async`, if it has not been specified.
This is problematic for Razor because it will now suggest making the code behind method that is "wrapping" the use of C# into an async method.
It makes this change by including additional text edits in the completion item.
Example that generates an incompatible completion item:
```
@da$$
```
Cases where you are in an async method there are no additional text edits and we can continue to offer the `await` keyword.
Example that generates a compatible completion item:
```
@code {
async Task GetNamesAsync()
{
var names = awa$$
}
}
```
// The `await` completion item is not compatible with all Razor scenarios.
37
+
//
38
+
// The `await` completion has been made smarter in that it will now update the containing method signature to include `async`, if it has not been specified.
39
+
// This is problematic for Razor because it will now suggest making the code behind method that is "wrapping" the use of C# into an async method.
40
+
// It makes this change by including additional text edits in the completion item.
41
+
//
42
+
// Example that generates an incompatible completion item:
43
+
//
44
+
// ```
45
+
// @Da$$
46
+
// ```
47
+
//
48
+
// Cases where you are in an async method there are no additional text edits and we can continue to offer the `await` keyword.
49
+
//
50
+
// Example that generates a compatible completion item:
0 commit comments