This topic has not yet been rated - Rate this topic

WindowsRuntimeStreamExtensions Class

May 02, 2013

For apps that target Windows Phone OS 7.0 and 7.1, do not use any members of this type in your app. If you do, your code will throw a MethodAccessException. This type is security-critical, which restricts it to internal use by the .NET Framework for Windows Phone class library.
[SECURITY CRITICAL]

Contains extension methods for converting between streams in the Windows Runtime and managed streams in the .NET for Windows Store apps.

System.Object
  System.IO.WindowsRuntimeStreamExtensions

Namespace:  System.IO
Assembly:  System.Runtime.WindowsRuntime (in System.Runtime.WindowsRuntime.dll)
[SecurityCriticalAttribute]
public static class WindowsRuntimeStreamExtensions

The WindowsRuntimeStreamExtensions type exposes the following members.

  NameDescription
Public methodStatic memberAsInputStreamConverts a managed stream in the .NET for Windows Store apps to an input stream in the Windows Runtime.
Public methodStatic memberAsOutputStreamConverts a managed stream in the .NET for Windows Store apps to an output stream in the Windows Runtime.
Public methodStatic memberAsStream(IRandomAccessStream)Converts a random access stream in the Windows Runtime to a managed stream in the .NET for Windows Store apps.
Public methodStatic memberAsStream(IRandomAccessStream, Int32)Converts a random access stream in the Windows Runtime to a managed stream in the .NET for Windows Store apps using the specified buffer size.
Public methodStatic memberAsStreamForRead(IInputStream)Converts an input stream in the Windows Runtime to a managed stream in the .NET for Windows Store apps.
Public methodStatic memberAsStreamForRead(IInputStream, Int32)Converts an input stream in the Windows Runtime to a managed stream in the .NET for Windows Store apps using the specified buffer size.
Public methodStatic memberAsStreamForWrite(IOutputStream)Converts an output stream in the Windows Runtime to a managed stream in the .NET for Windows Store apps.
Public methodStatic memberAsStreamForWrite(IOutputStream, Int32)Converts an output stream in the Windows Runtime to a managed stream in the .NET for Windows Store apps using the specified buffer size.
Top

Windows Phone OS

Supported in: 8.0
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.