关闭

VirtualStream, SeekableReadonlyStream and MarkableForwardOnlyEventingReadStream

1061人阅读 评论(0) 收藏 举报

This is interesting!

I am off projects for support these days, just bored and starting to poke Microsoft pipeline component framework for fun. It is interesting to discover that in Microsoft.BizTalk.Streaming namespace:

·         They have an implementation for VirtualStream! I am always using the SDK sample one but seems like this very implementation has more functions (and I believe is more stable) than the SDK free sample. I tried to compare the two and did find some differences, although the reflector generated code might not be accurate. I then opened the Microsoft SDK sample project (ArbitoryXPathHandler), remove the VirtualStream.cs and add reference of Microsoft.Streaming. I recompile the project and everything seems fine! I didn’t try to run the sample though, I just assume it works the same way.

·         They have a same implementation for ReadOnlySeekableStream as well.

·         They have another one, MarkableForwardOnlyEventingReadStream, as its name implies, you can MarkPosition and ResetPosition which helps a lot! By far, I didn’t find any special use of this stream but it seems more than just markable functions, as it is just everywhere within the default flatfile, xml pipeline implementations. And I also believe they are pretty stable and memory efficient as it is used in flat file disassembler.

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:8701次
    • 积分:237
    • 等级:
    • 排名:千里之外
    • 原创:17篇
    • 转载:0篇
    • 译文:0篇
    • 评论:0条