Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyStream : Stream
- {
- public MyStream()
- {
- }
- public override int Read(byte[] buffer, int offset, int count)
- {
- return 0;
- }
- public override void Write(byte[] buffer, int offset, int count)
- {
- MyFunction(buffer); // <-- My function here
- }
- public override void Close()
- {
- }
- public override long Length
- {
- get { return 0; }
- }
- // Abstract methods below //
- public override long Seek(long offset, SeekOrigin origin) { return 0; }
- public override void SetLength(long value) { }
- public override void Flush() { }
- public override bool CanRead
- {
- get { return true; }
- }
- public override bool CanSeek
- {
- get { return true; }
- }
- public override bool CanWrite
- {
- get { return true; }
- }
- public override long Position
- {
- get
- {
- return 0;
- }
- set
- {
- return;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement