Skip to content

Commit 1ca8328

Browse files
committed
edit pass: visual-studio-prompts-articles
1 parent 4529436 commit 1ca8328

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

docs/extensibility/visualstudio.extensibility/dialog/dialog.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ The [ShowDialogAsync](/dotnet/api/microsoft.visualstudio.extensibility.shell.she
5656
```csharp
5757
public override async Task ExecuteCommandAsync(IClientContext context, CancellationToken cancellationToken)
5858
{
59-
// Ownership of the RemoteUserControl is transferred to Visual Studio, so it shouldn't be disposed by the extension.
60-
#pragma warning disable CA2000 // Dispose of objects before losing scope.
59+
// Ownership of the RemoteUserControl is transferred to Visual Studio, so it shouldn't be disposed by the extension
60+
#pragma warning disable CA2000 // Dispose objects before losing scope
6161
var control = new MyDialogControl(null);
62-
#pragma warning restore CA2000 // Dispose of objects before losing scope.
62+
#pragma warning restore CA2000 // Dispose objects before losing scope
6363
6464
await this.Extensibility.Shell().ShowDialogAsync(control, cancellationToken);
6565
}
@@ -76,10 +76,10 @@ When your extension shows a dialog, you can provide a custom title string which
7676
```csharp
7777
public override async Task ExecuteCommandAsync(IClientContext context, CancellationToken cancellationToken)
7878
{
79-
// Ownership of the RemoteUserControl is transferred to Visual Studio, so it shouldn't be disposed by the extension.
80-
#pragma warning disable CA2000 // Dispose of objects before losing scope.
79+
// Ownership of the RemoteUserControl is transferred to Visual Studio, so it shouldn't be disposed by the extension
80+
#pragma warning disable CA2000 // Dispose objects before losing scope
8181
var control = new MyDialogControl(null);
82-
#pragma warning restore CA2000 // Dispose of objects before losing scope.
82+
#pragma warning restore CA2000 // Dispose objects before losing scope
8383
8484
await this.Extensibility.Shell().ShowDialogAsync(control, "My Dialog Title", cancellationToken);
8585
}
@@ -118,12 +118,12 @@ You can also create your own combination of buttons and default actions from:
118118
// action provided by the Microsoft.Visual Studio.RpcContracts.RemoteUI.IRemoteUserControl
119119
// content.
120120
None,
121-
// The user selected the Close button.
121+
// The user pressed the Close button.
122122
Close,
123-
// The user selected the OK button.
123+
// The user pressed the OK button.
124124
OK,
125-
// The user selected the Cancel button, or selected the nonclient close button, or
126-
// selected the Esc key.
125+
// The user pressed the Cancel button, or pressed the nonclient close button, or
126+
// pressed the Esc key.
127127
Cancel
128128
}
129129
```
@@ -135,10 +135,10 @@ Add a Cancel button:
135135
```csharp
136136
public override async Task ExecuteCommandAsync(IClientContext context, CancellationToken cancellationToken)
137137
{
138-
// Ownership of the RemoteUserControl is transferred to Visual Studio, so it shouldn't be disposed by the extension.
139-
#pragma warning disable CA2000 // Dispose of objects before losing scope.
138+
// Ownership of the RemoteUserControl is transferred to Visual Studio, so it shouldn't be disposed by the extension
139+
#pragma warning disable CA2000 // Dispose objects before losing scope
140140
var control = new MyDialogControl(null);
141-
#pragma warning restore CA2000 // Dispose of objects before losing scope.
141+
#pragma warning restore CA2000 // Dispose objects before losing scope
142142
143143
await this.Extensibility.Shell().ShowDialogAsync(control, DialogOption.OKCancel, cancellationToken);
144144
}
@@ -149,10 +149,10 @@ No dialog buttons:
149149
```csharp
150150
public override async Task ExecuteCommandAsync(IClientContext context, CancellationToken cancellationToken)
151151
{
152-
// Ownership of the RemoteUserControl is transferred to Visual Studio, so it shouldn't be disposed by the extension.
153-
#pragma warning disable CA2000 // Dispose of objects before losing scope.
152+
// Ownership of the RemoteUserControl is transferred to Visual Studio, so it shouldn't be disposed by the extension
153+
#pragma warning disable CA2000 // Dispose objects before losing scope
154154
var control = new MyDialogControl(null);
155-
#pragma warning restore CA2000 // Dispose of objects before losing scope.
155+
#pragma warning restore CA2000 // Dispose objects before losing scope
156156
157157
await this.Extensibility.Shell().ShowDialogAsync(control, new DialogOption(DialogButton.None, DialogResult.None), cancellationToken);
158158
}
@@ -165,20 +165,20 @@ If you need to know whether a user affirmatively closed a dialog or dismissed it
165165
```csharp
166166
public override async Task ExecuteCommandAsync(IClientContext context, CancellationToken cancellationToken)
167167
{
168-
// Ownership of the RemoteUserControl is transferred to Visual Studio, so it shouldn't be disposed by the extension.
169-
#pragma warning disable CA2000 // Dispose of objects before losing scope.
168+
// Ownership of the RemoteUserControl is transferred to Visual Studio, so it shouldn't be disposed by the extension
169+
#pragma warning disable CA2000 // Dispose objects before losing scope
170170
var control = new MyDialogControl(null);
171-
#pragma warning restore CA2000 // Dispose of objects before losing scope.
171+
#pragma warning restore CA2000 // Dispose objects before losing scope
172172
173173
DialogResult result = await this.Extensibility.Shell().ShowDialogAsync(control, "My Dialog Title", DialogOption.OKCancel, cancellationToken);
174174

175175
if (result == DialogResult.OK)
176176
{
177-
// The user selected the OK button.
177+
// The user pressed the OK button.
178178
}
179179
}
180180
```
181181

182182
## Related content
183183

184-
- See [DialogSample](https://github.com/Microsoft/VSExtensibility/tree/main/New_Extensibility_Model/Samples/DialogSample) for a full example of how to create an extension with a dialog.
184+
- See [DialogSample](https://github.com/Microsoft/VSExtensibility/tree/main/New_Extensibility_Model/Samples/DialogSample) for a full example of how to create an extension with a dialog.

docs/extensibility/visualstudio.extensibility/user-prompt/file-directory-picker-prompts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,4 +198,4 @@ string? folderPath = await Extensibilty.Shell().ShowOpenFolderDialogAsync(option
198198

199199
## Related content
200200

201-
- Next, see the [FilePickerSample](https://github.com/Microsoft/VSExtensibility/tree/main/New_Extensibility_Model/Samples/FilePickerSample/).
201+
- See the [FilePickerSample](https://github.com/Microsoft/VSExtensibility/tree/main/New_Extensibility_Model/Samples/FilePickerSample/).

0 commit comments

Comments
 (0)