C# 클래스 System.Net.Http.StreamToStreamCopy

Helper class is used to copy the content of a source stream to a destination stream, with optimizations based on expected usage within HttpClient and with the ability to dispose of the source stream when the copy has completed.
파일 보기 프로젝트 열기: dotnet/corefx 1 사용 예제들

공개 메소드들

메소드 설명
CopyAsync ( Stream source, Stream destination, int bufferSize, bool disposeSource, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Copies the source stream from its current position to the destination stream at its current position.

비공개 메소드들

메소드 설명
DisposeSource ( Stream source ) : void

Disposes the source stream if disposeSource is true.

DisposeSourceWhenCompleteAsync ( Task task, Stream source ) : Task

메소드 상세

CopyAsync() 공개 정적인 메소드

Copies the source stream from its current position to the destination stream at its current position.
public static CopyAsync ( Stream source, Stream destination, int bufferSize, bool disposeSource, CancellationToken cancellationToken = default(CancellationToken) ) : Task
source System.IO.Stream The source stream from which to copy.
destination System.IO.Stream The destination stream to which to copy.
bufferSize int The size of the buffer to allocate if one needs to be allocated.
disposeSource bool Whether to dispose of the source stream after the copy has finished successfully.
cancellationToken System.Threading.CancellationToken CancellationToken used to cancel the copy operation.
리턴 Task