public abstract class RunicPromisedFile : IAsyncDisposable A dropped file that had no local path, such as a mail attachment, for RunicFileDrop.PromisedFiles.
Remarks
The host stages the file privately; read it once and dispose it, which deletes the staged copy.
Constructors
RunicPromisedFile
protected RunicPromisedFile() No documentation.
Properties
Name
public abstract string Name { get; } Gets the file name, without a directory, as the drag source named it and sanitized for display.
Methods
DisposeAsync
public abstract ValueTask DisposeAsync() Closes the content and deletes the staged copy.
Returns
A task that completes when the copy is deleted.
OpenReadAsync
public abstract ValueTask<Stream> OpenReadAsync(CancellationToken cancellationToken = default) Opens the file's content; a promised file can be opened once.
Parameters
cancellationTokenCancels opening.
Returns
The content, owned by this file: disposing the file closes it.
Exceptions
InvalidOperationExceptionThe file was already opened.
ObjectDisposedExceptionThe file was disposed.