InteractionFile Methods
ClassMethods2 members
Represents a file selected by the user for an
InputType.File input. Opens a read-only stream for the file content.
public sealed class InteractionFile{ public Stream OpenRead() { // ... }}Returns
StreamA IO.Stream for reading the file.Exceptions
ObjectDisposedExceptionThe owning InteractionFileCollection has been disposed.Remarks
The returned stream remains usable if the owning
InteractionFileCollection is disposed. Dispose the stream when reading is complete so the operating system can finish reclaiming the deleted file. Reads all bytes of the file asynchronously.
public sealed class InteractionFile{ public Task<byte[]> ReadAllBytesAsync( CancellationToken cancellationToken = default(CancellationToken)) { // ... }}Parameters
cancellationToken CancellationToken optionalA token to monitor for cancellation requests.Returns
Task<byte[]> A byte array containing the file content.Exceptions
ObjectDisposedExceptionThe owning InteractionFileCollection has been disposed.