Depending on the concrete type of the stream managed by a NetFxToWinRtStreamAdapter
, we want the ReadAsync
/ WriteAsync
/ FlushAsync
/ etc. operation to be implemented differently. This is for best performance as we can take advantage of the specifics of particular stream types. For instance, ReadAsync
currently has a special implementation for memory streams. Moreover, knowledge about the actual runtime type of the IBuffer
can also help chosing the optimal implementation. This type provides static methods that encapsulate the performance logic and can be used by NetFxToWinRtStreamAdapter
.