IExtensionMetadataCache.InsertExtensionDataAsync<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Updates specified section entries for an extension.
public System.Threading.Tasks.Task<bool> InsertExtensionDataAsync<T> (Microsoft.VisualStudio.RpcContracts.Extensibility.ExtensionIdentificationToken extension, System.Collections.Generic.IEnumerable<string> metadataFilePaths, string dataMoniker, Func<System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyDictionary<string,T>>> updateFunction, System.Threading.CancellationToken cancellationToken);
abstract member InsertExtensionDataAsync : Microsoft.VisualStudio.RpcContracts.Extensibility.ExtensionIdentificationToken * seq<string> * string * Func<System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyDictionary<string, 'T>>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Function InsertExtensionDataAsync(Of T) (extension As ExtensionIdentificationToken, metadataFilePaths As IEnumerable(Of String), dataMoniker As String, updateFunction As Func(Of Task(Of IReadOnlyDictionary(Of String, T))), cancellationToken As CancellationToken) As Task(Of Boolean)
Type Parameters
- T
Target type to use for serialization.
Parameters
- extension
- ExtensionIdentificationToken
Extension identifier.
- metadataFilePaths
- IEnumerable<String>
File paths to utilize for time stamp checks in cache verification.
- dataMoniker
- String
Data type moniker.
- updateFunction
- Func<Task<IReadOnlyDictionary<String,T>>>
Async update function to call if extension needs to be updated. Key represents the section name.
- cancellationToken
- CancellationToken
Cancellation token to monitor.
Returns
return true if extension was up to date and no action was taken.