Skip to content

Commit 460088b

Browse files
authored
Merge pull request #10739 from MicrosoftDocs/main638818058136894260sync_temp
Repo sync for protected branch
2 parents c00df97 + 8d92fcf commit 460088b

File tree

1 file changed

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

1 file changed

+7
-3
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,21 @@ This overview covers top scenarios for working with the project query API:
6161

6262
You'll need to obtain an instance of the *project query space* object to query the project system. This object has several asynchronous methods that query or update the project system. The term *project query space* and the term *workspace* both mean the same thing and refer to the object that provides access to all the data for a project. `workspace` will be consistently used in this documentation.
6363

64-
### Using VisualStudio.Extensibility
64+
There are two approaches to accessing the project query space: **WorkspacesExtensibility** and **ProjectQueryableSpace**.
65+
66+
### Using WorkspacesExtensibility (Recommended)
67+
The `WorkspacesExtensibility` object, built into `Microsoft.VisualStudio.Extensibility`, provides a simple and integrated way to use project query.
6568

6669
```csharp
6770
WorkspacesExtensibility workspace = this.Extensibility.Workspaces();
6871
```
6972

70-
### Using a service broker
73+
### Using ProjectQueryableSpace
74+
Alternatively, you can use a `ProjectQueryableSpace` object created via a service broker. This approach is useful for scenarios requiring more control or integration with specific services.
7175

7276
```csharp
7377
IServiceBroker serviceBroker = context.Extensibility.ServiceBroker;
74-
ProjectQueryableSpace workspace = new ProjectQueryableSpace(serviceBroker: serviceBroker, joinableTaskContext: null);
78+
ProjectQueryableSpace queryspace = new ProjectQueryableSpace(serviceBroker: serviceBroker, joinableTaskContext: null);
7579
```
7680

7781
In the example above, `context` refers to an instance of `IClientContext` provided by `Microsoft.VisualStudio.Extensibility`. It is used to access contextual information and services related to the current state and environment of the IDE.

0 commit comments

Comments
 (0)