C# 클래스 NSoft.NFramework.Parallelism.Tools.StreamAsync

비동기적 스트림 작업에 쓰이는 Extension Method 들입니다.
참고 사이트 : http://msdn.microsoft.com/ko-kr/library/ms228963.aspx http://msdn.microsoft.com/ko-kr/library/dd997423.aspx
파일 보기 프로젝트 열기: debop/NFramework

공개 메소드들

메소드 설명
CopyStreamToFileAsync ( this source, string destinationPath ) : System.Threading.Tasks.Task

source를 읽어 destinationPath 의 파일에 비동기적으로 씁니다.

CopyStreamToStreamAsync ( this source, Stream destination ) : System.Threading.Tasks.Task

source를 읽어 destination에 비동기적으로 씁니다.

ReadAllBytesAsync ( this stream ) : Task

stream의 모든 Data를 비동기 방식으로 읽는 작업을 생성합니다.

ReadAsync ( this stream, byte buffer, int offset, int count ) : Task

지정된 스트림을 비동기 방식으로 읽어, buffer에 채웁니다. 작업의 결과는 읽은 바이트 수입니다.

ReadBufferAsync ( this stream, int bufferSize, int>.Action bufferAvailable ) : System.Threading.Tasks.Task

stream 을 비동기 방식으로 반복해서 읽어드리는 Task를 빌드합니다.

WriteAsync ( this stream, byte buffer, int offset, int count ) : System.Threading.Tasks.Task

buffer 내용을 지정된 스트림에 비동기 방식으로 씁니다.

비공개 메소드들

메소드 설명
CopyStreamIterator ( Stream input, Stream output ) : IEnumerable
ReadIterator ( Stream input, int bufferSize, int>.Action bufferAvailable ) : IEnumerable

메소드 상세

CopyStreamToFileAsync() 공개 정적인 메소드

source를 읽어 destinationPath 의 파일에 비동기적으로 씁니다.
public static CopyStreamToFileAsync ( this source, string destinationPath ) : System.Threading.Tasks.Task
source this
destinationPath string
리턴 System.Threading.Tasks.Task

CopyStreamToStreamAsync() 공개 정적인 메소드

source를 읽어 destination에 비동기적으로 씁니다.
public static CopyStreamToStreamAsync ( this source, Stream destination ) : System.Threading.Tasks.Task
source this
destination Stream
리턴 System.Threading.Tasks.Task

ReadAllBytesAsync() 공개 정적인 메소드

stream의 모든 Data를 비동기 방식으로 읽는 작업을 생성합니다.
public static ReadAllBytesAsync ( this stream ) : Task
stream this
리턴 Task

ReadAsync() 공개 정적인 메소드

지정된 스트림을 비동기 방식으로 읽어, buffer에 채웁니다. 작업의 결과는 읽은 바이트 수입니다.
public static ReadAsync ( this stream, byte buffer, int offset, int count ) : Task
stream this
buffer byte
offset int
count int
리턴 Task

ReadBufferAsync() 공개 정적인 메소드

stream 을 비동기 방식으로 반복해서 읽어드리는 Task를 빌드합니다.
public static ReadBufferAsync ( this stream, int bufferSize, int>.Action bufferAvailable ) : System.Threading.Tasks.Task
stream this 읽을 스트림 객체
bufferSize int 한번에 읽을 버퍼 크기
bufferAvailable int>.Action 읽은 버퍼가 유효한 것인지 판단하는 델리게이트
리턴 System.Threading.Tasks.Task

WriteAsync() 공개 정적인 메소드

buffer 내용을 지정된 스트림에 비동기 방식으로 씁니다.
public static WriteAsync ( this stream, byte buffer, int offset, int count ) : System.Threading.Tasks.Task
stream this
buffer byte
offset int
count int
리턴 System.Threading.Tasks.Task