FulcrumFS FulcrumFS
FulcrumFS FulcrumFS
DocFX + Singulink = ♥

Search Results for

    Method ValidateAsync

    ValidateAsync(Stream, CancellationToken)

    Validates the content of the specified stream against this file format. The stream must be seekable and positioned at 0 at the start of this call.

    Declaration
    public abstract ValueTask<FileFormatValidationResult> ValidateAsync(Stream stream, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    Stream stream

    A seekable stream positioned at 0, containing the file's content to validate.

    CancellationToken cancellationToken

    A cancellation token.

    Returns
    Type Description
    ValueTask<FileFormatValidationResult>

    A FileFormatValidationResult indicating whether validation succeeded or failed (with an error message).

    Remarks

    Implementations are free to leave the stream in any position after returning. The caller is responsible for resetting the position if needed.

    © Singulink. All rights reserved.