Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helpers for reading an arbitrary Stream #10

Closed
airbreather opened this issue May 26, 2019 · 0 comments
Closed

Helpers for reading an arbitrary Stream #10

airbreather opened this issue May 26, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request usability Make the library easier to use
Milestone

Comments

@airbreather
Copy link
Owner

airbreather commented May 26, 2019

Desired usage:

public static void MyMethod(Stream stream, int bufferSize)
{
    var visitor = new MyVisitor();
    CsvReader.Process(stream, bufferSize);
}

public static async Task MyMethod(Stream stream, int bufferSize, IProgress<int> progress = null, CancellationToken cancellationToken = default)
{
    var visitor = new MyVisitor();
    await CsvReader.ProcessAsync(stream, bufferSize, progress, cancellationToken);
}

The IProgress<int> instance would receive the return of each Stream.Read or Stream.ReadAsync call after that chunk has been fully processed.

@airbreather airbreather added enhancement New feature or request usability Make the library easier to use labels May 26, 2019
@airbreather airbreather added this to the 1.1.0 milestone May 26, 2019
airbreather added a commit that referenced this issue May 26, 2019
@airbreather airbreather self-assigned this May 28, 2019
airbreather added a commit that referenced this issue Jun 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request usability Make the library easier to use
Projects
None yet
Development

No branches or pull requests

1 participant