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

Make storage extensions conditional #239

Merged
merged 2 commits into from
Apr 29, 2020
Merged

Conversation

Scottj1s
Copy link
Member

To support Windows interop work. BufferedStream.BufferSize and BufferedStream.UnderlyingStream require .NET Standard 2.1

…fferedStream.UnderlyingStream require .NET Standard 2.1
@manodasanW
Copy link
Member

How about that one?

private static object AsWindowsRuntimeStreamInternal(Stream stream)
{
// Check to see if the managed stream is actually a wrapper of a WinRT stream:
// (This can be either an adapter directly, or an adapter wrapped in a BufferedStream.)
WinRtToNetFxStreamAdapter sAdptr = stream as WinRtToNetFxStreamAdapter;
if (sAdptr == null)
{
BufferedStream buffAdptr = stream as BufferedStream;
if (buffAdptr != null)
sAdptr = buffAdptr.UnderlyingStream as WinRtToNetFxStreamAdapter;
}

@Scottj1s
Copy link
Member Author

AsWindowsRuntimeStreamInternal

good catch

@Scottj1s Scottj1s merged commit c2c91f0 into master Apr 29, 2020
@Scottj1s Scottj1s deleted the scottj1s/storage_extensions branch April 29, 2020 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants