https://github.com/jplane/multistream
A .NET Standard Library for aggregating read-only streams
https://github.com/jplane/multistream
Last synced: about 1 year ago
JSON representation
A .NET Standard Library for aggregating read-only streams
- Host: GitHub
- URL: https://github.com/jplane/multistream
- Owner: jplane
- License: mit
- Created: 2017-11-21T19:00:58.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-21T19:01:02.000Z (over 8 years ago)
- Last Synced: 2025-02-02T05:25:36.459Z (over 1 year ago)
- Language: C#
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MultiStream
This is a .NET Standard library for aggregating read-only streams, so that classes like StreamReader can treat multiple input streams as a single contiguous block of bytes.
Usage:
```C#
var ms1 = GetStream("hello world");
var ms2 = GetStream("goodbye world");
var s = new Lib.MultiStream(ms1, ms2);
var reader = new StreamReader(s);
var output = reader.ReadToEnd();
Assert.AreEqual("hello worldgoodbye world", output);
```
The repo includes a .NET Core unit test project and a .NET Framework console app that both demonstrate basic usage.