Table of Contents

Class InitializableTask

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

The base class where its derived class must require asynchronous initialization before use.

[GeneratedComClass]
[ComExposedClass<ComClassInformation>]
public abstract class InitializableTask : IInitializableTask, IFree
Inheritance
InitializableTask
Implements
Derived
Inherited Members

Methods

Free()

Free the resources associated by an instance.

public abstract void Free()

InitAsync(in Guid, out nint)

Asynchronously initializes the instance.

public virtual void InitAsync(in Guid cancelToken, out nint result)

Parameters

cancelToken Guid

Guid instance for cancellation token.

result nint

A pointer to ComAsyncResult.

Remarks

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

InitAsync(CancellationToken)

Perform asynchronous initialization of the instance.

protected virtual Task<int> InitAsync(CancellationToken token)

Parameters

token CancellationToken

A CancellationToken that can be used to cancel the initialization process.

Returns

Task<int>

A Task<TResult> representing the asynchronous operation.

Returns 69420 if the initialization completes successfully after a 10-second delay. Returns MinValue if the operation is canceled via the provided token.

Remarks

Note for Plugin Developers:
This base implementation is intended as a placeholder and should be overridden in derived classes. It demonstrates async interop and cancellation support for plugin initialization.