Table of Contents

Interface IPluginSelfUpdate

Namespace
Hi3Helper.Plugin.Core.Update
Assembly
Hi3Helper.Plugin.Core.dll

An interface which provides a method to perform plugin self-update.

[GeneratedComInterface]
[Guid("436f6c6c-6170-7365-727f-000000000100")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[IUnknownDerived<InterfaceInformation, InterfaceImplementation>]
public interface IPluginSelfUpdate : IFree

Methods

Free()

void Free()

TryPerformUpdateAsync(string?, bool, InstallProgressDelegate?, in Guid, out nint)

Asynchronously perform update on the plugin.

void TryPerformUpdateAsync(string? outputDir, bool checkForUpdatesOnly, InstallProgressDelegate? progressDelegate, in Guid cancelToken, out nint result)

Parameters

outputDir string

An output directory which the new version of library will be downloaded to.

checkForUpdatesOnly bool

Whether to perform the check only or also to perform the update at the same time.

progressDelegate InstallProgressDelegate

A delegate which pass InstallProgress to indicate update progress into the callback.

cancelToken Guid

Guid instance for cancellation token.

result nint

A pointer to ComAsyncResult.

Remarks

This method returns a pointer to ComAsyncResult via result. This method has a return value of the pointer of SelfUpdateReturnInfo.
Please use AsTask<T>(nint) to get the return value.

While checkForUpdatesOnly is set to true, the status will only contain UpdateIsAvailable or NoAvailableUpdate inside of ReturnCode and the update won't be performed.