Table of Contents

Class PluginBase

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

The base class for accessing plugin metadata and preset configuration.

[GeneratedComClass]
[ComExposedClass<ComClassInformation>]
public abstract class PluginBase : IPlugin, IFree
Inheritance
PluginBase
Implements
Inherited Members

Remarks

This PluginBase base class requires the abstract methods to be implemented, except for the CancelAsync(in Guid) method.

Methods

CancelAsync(in Guid)

Cancels an asynchronous operation associated with the specified cancellation token.

public void CancelAsync(in Guid cancelToken)

Parameters

cancelToken Guid

The token identifying the operation to cancel.

Dispose()

public virtual void Dispose()

Free()

Free the resources associated by an instance.

public void Free()

GetNotificationPosterUrl(out string)

Gets the notification poster URL of the plugin.

public virtual void GetNotificationPosterUrl(out string result)

Parameters

result string

The notification poster URL of the plugin.

GetPluginAppIconUrl(out string)

Gets the app icon URL of the plugin.

public virtual void GetPluginAppIconUrl(out string result)

Parameters

result string

The icon URL of the plugin.

GetPluginAuthor(out string?)

Gets information about the author of the plugin.

public abstract void GetPluginAuthor(out string? result)

Parameters

result string

The author information.

GetPluginCreationDate(out DateTime*)

Gets the creation date of the plugin.

public abstract void GetPluginCreationDate(out DateTime* result)

Parameters

result DateTime*

A pointer to a DateTime instance representing the creation date (Equivalent to DateTime** result).

GetPluginDescription(out string?)

Gets the description of the plugin.

public abstract void GetPluginDescription(out string? result)

Parameters

result string

The description of the plugin or game.

GetPluginName(out string?)

Gets the name of the plugin or the game it represents.

public abstract void GetPluginName(out string? result)

Parameters

result string

The name of the plugin or game.

GetPluginSelfUpdater(out IPluginSelfUpdate?)

Gets the plugin self-updater instance.

public virtual void GetPluginSelfUpdater(out IPluginSelfUpdate? selfUpdate)

Parameters

selfUpdate IPluginSelfUpdate

An instance to IPluginSelfUpdate.

GetPresetConfig(int, out IPluginPresetConfig)

Gets a specific IPluginPresetConfig instance by index.

public abstract void GetPresetConfig(int index, out IPluginPresetConfig result)

Parameters

index int

The index of the preset configuration.

result IPluginPresetConfig

GetPresetConfigCount(out int)

Gets the number of available IPluginPresetConfig instances.

public abstract void GetPresetConfigCount(out int count)

Parameters

count int

The count of how much Plugin Preset Configs are available.

SetPluginLocaleId(string?)

Set the locale ID for the plugin.

public void SetPluginLocaleId(string? localeId)

Parameters

localeId string

The locale ID to be set (for example: en-US)

SetPluginProxySettings(string?, string?, string?, out bool)

Sets the proxy settings used by the plugin. To reset the configuration, set all arguments as null

public void SetPluginProxySettings(string? hostUri, string? username, string? password, out bool isSuccess)

Parameters

hostUri string

The host URI of the proxy server.
Only few Proxy protocol supported by the plugin, including: http://, https://, socks4:// and socks5://

username string

The username for proxy authentication. Leave it as null if none is needed.

password string

The password for proxy authentication. Leave it as null if none is needed.

isSuccess bool

Returns true if the settings are valid. Otherwise, returns false.