C# 클래스 System.IO.NetFxToWinRtStreamAdapter

An wrapper for a managed stream that implements all WinRT stream operations. This class must not implement any WinRT stream interfaces directly. We never create instances of this class directly; instead we use classes defined in the region Interface adapters to implement WinRT ifaces and create instances of those types. See comment in that region for technical details.
상속: IDisposable
파일 보기 프로젝트 열기: dotnet/corefx 1 사용 예제들

공개 메소드들

메소드 설명
CloneStream ( ) : IRandomAccessStream
FlushAsync ( ) : IAsyncOperation
GetInputStreamAt ( UInt64 position ) : IInputStream
GetManagedStream ( ) : Stream
GetOutputStreamAt ( UInt64 position ) : IOutputStream
ReadAsync ( Windows.Storage.Streams.IBuffer buffer, UInt32 count, InputStreamOptions options ) : UInt32>.IAsyncOperationWithProgress
Seek ( UInt64 position ) : void
WriteAsync ( Windows.Storage.Streams.IBuffer buffer ) : UInt32>.IAsyncOperationWithProgress

비공개 메소드들

메소드 설명
CanApplyReadMemoryStreamOptimization ( Stream stream ) : bool
Create ( Stream stream ) : NetFxToWinRtStreamAdapter
DetermineStreamReadOptimization ( Stream stream ) : StreamReadOperationOptimization
EnsureNotDisposed ( ) : Stream
IDisposable ( ) : void

Implements IDisposable.Dispose (IClosable.Close in WinRT)

NetFxToWinRtStreamAdapter ( Stream stream, StreamReadOperationOptimization readOptimization ) : System.Diagnostics
SetWonInitializationRace ( ) : void

We keep tables for mappings between managed and WinRT streams to make sure to always return the same adapter for a given underlying stream. However, in order to avoid global locks on those tables, several instances of this type may be created and then can race to be entered into the appropriate map table. All except for the winning instances will be thrown away. However, we must ensure that when the losers are finalized, they do not dispose the underlying stream. To ensure that, we must call this method on the winner to notify it that it is safe to dispose the underlying stream.

ThrowCloningNotSupported ( String methodName ) : void

메소드 상세

CloneStream() 공개 메소드

public CloneStream ( ) : IRandomAccessStream
리턴 IRandomAccessStream

FlushAsync() 공개 메소드

public FlushAsync ( ) : IAsyncOperation
리턴 IAsyncOperation

GetInputStreamAt() 공개 메소드

public GetInputStreamAt ( UInt64 position ) : IInputStream
position UInt64
리턴 IInputStream

GetManagedStream() 공개 메소드

public GetManagedStream ( ) : Stream
리턴 Stream

GetOutputStreamAt() 공개 메소드

public GetOutputStreamAt ( UInt64 position ) : IOutputStream
position UInt64
리턴 IOutputStream

ReadAsync() 공개 메소드

public ReadAsync ( Windows.Storage.Streams.IBuffer buffer, UInt32 count, InputStreamOptions options ) : UInt32>.IAsyncOperationWithProgress
buffer Windows.Storage.Streams.IBuffer
count UInt32
options InputStreamOptions
리턴 UInt32>.IAsyncOperationWithProgress

Seek() 공개 메소드

public Seek ( UInt64 position ) : void
position UInt64
리턴 void

WriteAsync() 공개 메소드

public WriteAsync ( Windows.Storage.Streams.IBuffer buffer ) : UInt32>.IAsyncOperationWithProgress
buffer Windows.Storage.Streams.IBuffer
리턴 UInt32>.IAsyncOperationWithProgress