Skip to content

Commit e0011f9

Browse files
Merge pull request #12471 from Jxwoon/dev/jasminwoon/updateWhatPackageIs
Updating ProjectQuery Documentation "package"
2 parents bfe0c33 + 4537e23 commit e0011f9

File tree

1 file changed

+3
-1
lines changed
  • docs/extensibility/visualstudio.extensibility/project

1 file changed

+3
-1
lines changed

docs/extensibility/visualstudio.extensibility/project/project.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: hwelliver
66
monikerRange: ">=vs-2022"
77
ms.subservice: extensibility-integration
88
ms.topic: overview
9-
ms.date: 02/13/2023
9+
ms.date: 04/08/2024
1010
---
1111

1212
# Query the project API
@@ -62,6 +62,8 @@ WorkspacesExtensibility workSpace = this.Extensibility.Workspaces();
6262

6363
If you're creating an [in-process extension](../get-started/in-proc-extensions.md), you instead access the project query space as shown in the following code example. Unless you have specifically created an in-process extension, use the snippet in the previous section to get an instance of the project query space object.
6464

65+
In the following code excerpt, `package` represents an instance of [AsyncPackage](https://learn.microsoft.com/dotnet/api/microsoft.visualstudio.shell.asyncpackage?view=visualstudiosdk-2022), a class utilized in the development of Visual Studio extensions. The method `GetServiceAsync` is employed to asynchronously procure the query service from the Visual Studio's service container.
66+
6567
```csharp
6668
IProjectSystemQueryService queryService = await package.GetServiceAsync<IProjectSystemQueryService, IProjectSystemQueryService>();
6769
ProjectQueryableSpace workSpace = queryService.QueryableSpace;

0 commit comments

Comments
 (0)