Class PluginBase
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
cancelTokenGuidThe 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
resultstringThe 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
resultstringThe icon URL of the plugin.
GetPluginAuthor(out string?)
Gets information about the author of the plugin.
public abstract void GetPluginAuthor(out string? result)
Parameters
resultstringThe author information.
GetPluginCreationDate(out DateTime*)
Gets the creation date of the plugin.
public abstract void GetPluginCreationDate(out DateTime* result)
Parameters
resultDateTime*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
resultstringThe 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
resultstringThe name of the plugin or game.
GetPluginSelfUpdater(out IPluginSelfUpdate?)
Gets the plugin self-updater instance.
public virtual void GetPluginSelfUpdater(out IPluginSelfUpdate? selfUpdate)
Parameters
selfUpdateIPluginSelfUpdateAn instance to IPluginSelfUpdate.
GetPresetConfig(int, out IPluginPresetConfig)
Gets a specific IPluginPresetConfig instance by index.
public abstract void GetPresetConfig(int index, out IPluginPresetConfig result)
Parameters
indexintThe index of the preset configuration.
resultIPluginPresetConfig
GetPresetConfigCount(out int)
Gets the number of available IPluginPresetConfig instances.
public abstract void GetPresetConfigCount(out int count)
Parameters
countintThe count of how much Plugin Preset Configs are available.
SetPluginLocaleId(string?)
Set the locale ID for the plugin.
public void SetPluginLocaleId(string? localeId)
Parameters
localeIdstringThe 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
hostUristringThe host URI of the proxy server.
Only few Proxy protocol supported by the plugin, including: http://, https://, socks4:// and socks5://usernamestringThe username for proxy authentication. Leave it as
nullif none is needed.passwordstringThe password for proxy authentication. Leave it as
nullif none is needed.isSuccessboolReturns
trueif the settings are valid. Otherwise, returnsfalse.