Condividi tramite


IVsExtensionRepositoryQuery<T> Interface

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Used to populate the list of available extensions in an extension manager.

Namespace:  Microsoft.VisualStudio.ExtensionManager
Assembly:  Microsoft.VisualStudio.ExtensionManager (in Microsoft.VisualStudio.ExtensionManager.dll)

Syntax

'Declaration
Public Interface IVsExtensionRepositoryQuery(Of T As {New, IRepositoryEntry}) _
    Inherits IOrderedQueryable(Of T), IQueryable(Of T), IEnumerable(Of T),  _
    IOrderedQueryable, IQueryable, IEnumerable
public interface IVsExtensionRepositoryQuery<T> : IOrderedQueryable<T>, 
    IQueryable<T>, IEnumerable<T>, IOrderedQueryable, IQueryable, IEnumerable 
where T : new(), IRepositoryEntry
generic<typename T>
where T : gcnew(), IRepositoryEntry 
public interface class IVsExtensionRepositoryQuery : IOrderedQueryable<T>, 
    IQueryable<T>, IEnumerable<T>, IOrderedQueryable, IQueryable, IEnumerable
type IVsExtensionRepositoryQuery<'T when 'T : new() and IRepositoryEntry> =  
    interface 
        interface IOrderedQueryable<'T>
        interface IQueryable<'T>
        interface IEnumerable<'T>
        interface IOrderedQueryable 
        interface IQueryable 
        interface IEnumerable 
    end
JScript does not support generic types or methods.

Type Parameters

  • T

The IVsExtensionRepositoryQuery<T> type exposes the following members.

Properties

  Name Description
Public property ElementType Gets the type of the element(s) that are returned when the expression tree associated with this instance of IQueryable is executed. (Inherited from IQueryable.)
Public property Expression Gets the expression tree that is associated with the instance of IQueryable. (Inherited from IQueryable.)
Public property Provider Gets the query provider that is associated with this data source. (Inherited from IQueryable.)
Public property SearchText

Top

Methods

  Name Description
Public method ExecuteAsync() Asynchronously executes an IVsExtensionRepositoryQuery<T> query.
Public method ExecuteAsync(Object) Asynchronously executes an IVsExtensionRepositoryQuery<T> query.
Public method GetEnumerator Returns an enumerator that iterates through the collection. (Inherited from IEnumerable<T>.)

Top

Events

  Name Description
Public event ExecuteCompleted

Top

Remarks

Although this API supports the Extension Manager infrastructure, we recommend that you do not use it because it is subject to change.

This query is built by using LINQ syntax, through the IQueryable interface, to determine what extension properties to filter on. The query is then sent to the extension repository service, which queries the web service where the extensions are located and tries to translate the results into the requested object.

The IRepositoryEntry implementation should include properties that help to identify an extension to be downloaded, for example, title, date modified, and some category information. However, the extension repository service can only populate data that corresponds to key/value pairs that are offered by the web service that is associated with the extension gallery provider. For a partial list of properties that are supported by the extension repository service, see IRepositoryEntry.

Note

The default extension gallery provider is Visual Studio Gallery

The results of the query are returned in the ExecuteCompleted event as the Results property of the ExecuteCompletedEventArgs.

See Also

Reference

Microsoft.VisualStudio.ExtensionManager Namespace