Skip to content
DocsTry Aspire
DocsTry

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()
{
// ...
}
}
StreamA IO.Stream for reading the file.
ReadAllBytesAsync(CancellationToken)Section titled ReadAllBytesAsync(CancellationToken)Task<byte[]>
Reads all bytes of the file asynchronously.
public sealed class InteractionFile
{
public Task<byte[]> ReadAllBytesAsync(
CancellationToken cancellationToken = default(CancellationToken))
{
// ...
}
}
cancellationTokenCancellationTokenoptionalA token to monitor for cancellation requests.
Task<byte[]>A byte array containing the file content.