PluginDownload
Class in Oadm.Sdk.Plugins · Oadm.Sdk.dll
A file a core plugin sends to its client page through gRPC PluginService.Download (ICorePluginDownloads.OpenDownloadAsync): the host copies PluginDownload.Content to the client in chunks and disposes the download afterwards, also when the client cancels. Nothing is stored on the server, so a plugin can pass a device answer straight on (e.g. a recording export opened with VapixRequestOptions.StreamResponse).
public sealed class PluginDownload : IAsyncDisposableImplements IAsyncDisposable
Constructors
Section titled “Constructors”PluginDownload
Section titled “PluginDownload”PluginDownload(Stream content, string fileName, long? length = null, IDisposable? owner = null)Parameters
content: The bytes, read once from the start; disposed with the download.fileName: The suggested file name (no folder), e.g. the name the device sent.length: The length in bytes when known, else null.owner: Disposed aftercontent, e.g. the device response the stream belongs to.
Properties
Section titled “Properties”AuditDetail
Section titled “AuditDetail”string? AuditDetail { get; init; }What the audit entry of an audited download says (ICorePlugin.IsAudited), e.g. the device and the time range; null = the method name. Never a secret.
Content
Section titled “Content”Stream Content { get; }The bytes; read with your own token.
FileName
Section titled “FileName”string FileName { get; }The suggested file name.
Length
Section titled “Length”long? Length { get; }The size in bytes when known.
Methods
Section titled “Methods”DisposeAsync
Section titled “DisposeAsync”ValueTask DisposeAsync()Disposes the stream and its owner (e.g. the device response it reads from).