IIndexWorkspaceService.RefreshElementsAsync Method

Definition

Overloads

RefreshElementsAsync(IEnumerable<String>, IndexElement, CancellationToken)

Refresh an element

RefreshElementsAsync(IndexElement, Boolean, IProgress<IndexProgress>, CancellationToken, PauseToken)

Refreshes the contents of any caches or subscriptions with the actual contents from disk.

RefreshElementsAsync(IEnumerable<String>, IndexElement, CancellationToken)

Refresh an element

public:
 System::Threading::Tasks::Task ^ RefreshElementsAsync(System::Collections::Generic::IEnumerable<System::String ^> ^ filePaths, Microsoft::VisualStudio::Workspace::Indexing::IndexElement elements, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task RefreshElementsAsync (System.Collections.Generic.IEnumerable<string> filePaths, Microsoft.VisualStudio.Workspace.Indexing.IndexElement elements, System.Threading.CancellationToken cancellationToken);
abstract member RefreshElementsAsync : seq<string> * Microsoft.VisualStudio.Workspace.Indexing.IndexElement * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function RefreshElementsAsync (filePaths As IEnumerable(Of String), elements As IndexElement, cancellationToken As CancellationToken) As Task

Parameters

filePaths
IEnumerable<String>

Enumerable of entities to refresh

elements
IndexElement

Type of elements being refreshed

cancellationToken
CancellationToken

Cancellation token

Returns

A task representing the long-running operation.

Applies to

RefreshElementsAsync(IndexElement, Boolean, IProgress<IndexProgress>, CancellationToken, PauseToken)

Refreshes the contents of any caches or subscriptions with the actual contents from disk.

public System.Threading.Tasks.Task<Microsoft.VisualStudio.Workspace.Indexing.IndexResultInfo> RefreshElementsAsync (Microsoft.VisualStudio.Workspace.Indexing.IndexElement elements, bool continuous, IProgress<Microsoft.VisualStudio.Workspace.Indexing.IndexProgress> progressCallback, System.Threading.CancellationToken cancellationToken, Microsoft.VisualStudio.Workspace.PauseToken pauseToken = default);
public System.Threading.Tasks.Task<Microsoft.VisualStudio.Workspace.Indexing.IndexResultInfo> RefreshElementsAsync (Microsoft.VisualStudio.Workspace.Indexing.IndexElement elements, bool continuous, IProgress<Microsoft.VisualStudio.Workspace.Indexing.IndexProgress>? progressCallback, System.Threading.CancellationToken cancellationToken, Microsoft.VisualStudio.Workspace.PauseToken pauseToken = default);
abstract member RefreshElementsAsync : Microsoft.VisualStudio.Workspace.Indexing.IndexElement * bool * IProgress<Microsoft.VisualStudio.Workspace.Indexing.IndexProgress> * System.Threading.CancellationToken * Microsoft.VisualStudio.Workspace.PauseToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Workspace.Indexing.IndexResultInfo>
Public Function RefreshElementsAsync (elements As IndexElement, continuous As Boolean, progressCallback As IProgress(Of IndexProgress), cancellationToken As CancellationToken, Optional pauseToken As PauseToken = Nothing) As Task(Of IndexResultInfo)

Parameters

elements
IndexElement

Type of elements being refreshed

continuous
Boolean

Use true to continuously watch the file system and provide updates until cancellationToken is canceled. Use false to refresh just once.

progressCallback
IProgress<IndexProgress>

A progress reference callback

cancellationToken
CancellationToken

A token to cancel the refresh operation. Must not be None if continuous is true.

pauseToken
PauseToken

Optional pause token

Returns

A task representing the long-running operation.

Applies to