Class LauncherApiBase
- Namespace
- Hi3Helper.Plugin.Core.Management.Api
- Assembly
- Hi3Helper.Plugin.Core.dll
A base class for launcher API related instance (such as: Resource, Media, News, etc.)
[GeneratedComClass]
[ComExposedClass<ComClassInformation>]
public abstract class LauncherApiBase : InitializableTask, ILauncherApi, IInitializableTask, IFree
- Inheritance
-
LauncherApiBase
- Implements
- Derived
- Inherited Members
Fields
IsDisposed
protected bool IsDisposed
Field Value
ThisInstanceLock
protected readonly Lock ThisInstanceLock
Field Value
Properties
ApiResponseBaseUrl
protected virtual string? ApiResponseBaseUrl { get; }
Property Value
ApiResponseHttpClient
protected abstract HttpClient ApiResponseHttpClient { get; set; }
Property Value
Methods
Dispose()
public virtual void Dispose()
DownloadAssetAsync(LauncherPathEntry, FileHandle, FileReadProgressDelegate?, in Guid, out nint)
Asynchronously downloads an asset to the specified output stream.
public virtual void DownloadAssetAsync(LauncherPathEntry entry, FileHandle outputStreamHandle, PluginFiles.FileReadProgressDelegate? downloadProgress, in Guid cancelToken, out nint result)
Parameters
entryLauncherPathEntryLauncherPathEntry struct for the asset's URL to download.
outputStreamHandleFileHandleA handle to the output stream where the asset will be written.
downloadProgressPluginFiles.FileReadProgressDelegateAn optional callback delegate for reporting download progress.
cancelTokenGuidA Guid used as a cancellation token for the operation.
resultnintA native pointer (nint) to a ComAsyncResult representing the asynchronous operation.
Remarks
This method returns a native pointer (nint) to a ComAsyncResult via result representing the asynchronous operation.
DownloadAssetAsync(string, FileHandle, FileReadProgressDelegate?, in Guid, out nint)
Asynchronously downloads an asset to the specified output stream.
public virtual void DownloadAssetAsync(string fileUrl, FileHandle outputStreamHandle, PluginFiles.FileReadProgressDelegate? downloadProgress, in Guid cancelToken, out nint result)
Parameters
fileUrlstringThe asset's URL to download.
outputStreamHandleFileHandleA handle to the output stream where the asset will be written.
downloadProgressPluginFiles.FileReadProgressDelegateAn optional callback delegate for reporting download progress.
cancelTokenGuidA Guid used as a cancellation token for the operation.
resultnintA native pointer (nint) to a ComAsyncResult representing the asynchronous operation.
Remarks
A native pointer (nint) to a ComAsyncResult representing the asynchronous operation.
DownloadAssetAsyncInner(HttpClient?, string, Stream, PluginDisposableMemory<byte>, FileReadProgressDelegate?, CancellationToken)
Perform inner asynchronous download operation.
protected virtual Task DownloadAssetAsyncInner(HttpClient? client, string fileUrl, Stream outputStream, PluginDisposableMemory<byte> fileChecksum, PluginFiles.FileReadProgressDelegate? downloadProgress, CancellationToken token)
Parameters
clientHttpClientfileUrlstringoutputStreamStreamfileChecksumPluginDisposableMemory<byte>downloadProgressPluginFiles.FileReadProgressDelegatetokenCancellationToken
Returns
Exceptions
Free()
Free the resources associated by an instance.
public override void Free()