C# Class Microsoft.R.Host.Client.DataTransferSession

Inheritance: IDisposable
显示文件 Open project: Microsoft/RTVS Class Usage Examples

Public Methods

Method Description
CopyFileToRemoteTempAsync ( string filePath, bool doCleanUp, IProgress progress, CancellationToken cancellationToken ) : Task

Copies file from local file path to Temp folder on the remote session.

DataTransferSession ( IRSession session, IFileSystem fs ) : System
Dispose ( ) : void
FetchAndDecompressBytesAsync ( IRBlobInfo blob, bool doCleanUp, IProgress progress, CancellationToken cancellationToken ) : Task

Gets the data for a given blob (compressed) from R-Host and decompresses it. This method adds the blob for clean up by default.

FetchAndDecompressFileAsync ( IRBlobInfo blob, string filePath, bool doCleanUp, IProgress progress, CancellationToken cancellationToken ) : Task

Gets the data for a given blob from R-Host. Decompresses it and saves the data to filePath. This method adds the blob for clean up by default.

FetchBytesAsync ( IRBlobInfo blob, bool doCleanUp, IProgress progress, CancellationToken cancellationToken ) : Task

Gets the data for a given blob from R-Host. This method adds the blob for clean up by default.

FetchFileAsync ( IRBlobInfo blob, string filePath, bool doCleanUp, IProgress progress, CancellationToken cancellationToken ) : Task

Gets the data for a given blob from R-Host. Saves the data to filePath. This method adds the blob for clean up by default.

FetchFileToLocalTempAsync ( string remoteRPath, string localRPath, CancellationToken cancellationToken ) : Task

Copies file from remote file path to downloads folder on the local session.

SendBytesAsync ( byte data, bool doCleanUp, IProgress progress, CancellationToken cancellationToken ) : Task

Sends a block of data to R-Host by creating a new blob. This method adds the blob for clean up by default.

SendFileAsync ( string filePath, bool doCleanUp, IProgress progress, CancellationToken cancellationToken ) : Task

Sends file to R-Host by creating a new blob. This method adds the blob for clean up by default.

Method Details

CopyFileToRemoteTempAsync() public method

Copies file from local file path to Temp folder on the remote session.
public CopyFileToRemoteTempAsync ( string filePath, bool doCleanUp, IProgress progress, CancellationToken cancellationToken ) : Task
filePath string Path to the file to be sent to remote session.
doCleanUp bool true to add blob upon transfer for cleanup on dispose, false to ignore it after transfer.
progress IProgress
cancellationToken System.Threading.CancellationToken
return Task

DataTransferSession() public method

public DataTransferSession ( IRSession session, IFileSystem fs ) : System
session IRSession
fs IFileSystem
return System

Dispose() public method

public Dispose ( ) : void
return void

FetchAndDecompressBytesAsync() public method

Gets the data for a given blob (compressed) from R-Host and decompresses it. This method adds the blob for clean up by default.
public FetchAndDecompressBytesAsync ( IRBlobInfo blob, bool doCleanUp, IProgress progress, CancellationToken cancellationToken ) : Task
blob IRBlobInfo Blob from which the data is to be retrieved.
doCleanUp bool true to add blob upon transfer for cleanup on dispose, false to ignore it after transfer.
progress IProgress
cancellationToken System.Threading.CancellationToken
return Task

FetchAndDecompressFileAsync() public method

Gets the data for a given blob from R-Host. Decompresses it and saves the data to filePath. This method adds the blob for clean up by default.
public FetchAndDecompressFileAsync ( IRBlobInfo blob, string filePath, bool doCleanUp, IProgress progress, CancellationToken cancellationToken ) : Task
blob IRBlobInfo Blob from which the data is to be retrieved.
filePath string Path to the file where the retrieved data will be written.
doCleanUp bool true to add blob upon transfer for cleanup on dispose, false to ignore it after transfer.
progress IProgress
cancellationToken System.Threading.CancellationToken
return Task

FetchBytesAsync() public method

Gets the data for a given blob from R-Host. This method adds the blob for clean up by default.
public FetchBytesAsync ( IRBlobInfo blob, bool doCleanUp, IProgress progress, CancellationToken cancellationToken ) : Task
blob IRBlobInfo Blob from which the data is to be retrieved.
doCleanUp bool true to add blob upon transfer for cleanup on dispose, false to ignore it after transfer.
progress IProgress
cancellationToken System.Threading.CancellationToken
return Task

FetchFileAsync() public method

Gets the data for a given blob from R-Host. Saves the data to filePath. This method adds the blob for clean up by default.
public FetchFileAsync ( IRBlobInfo blob, string filePath, bool doCleanUp, IProgress progress, CancellationToken cancellationToken ) : Task
blob IRBlobInfo Blob from which the data is to be retrieved.
filePath string Path to the file where the retrieved data will be written.
doCleanUp bool true to add blob upon transfer for cleanup on dispose, false to ignore it after transfer.
progress IProgress
cancellationToken System.Threading.CancellationToken
return Task

FetchFileToLocalTempAsync() public method

Copies file from remote file path to downloads folder on the local session.
public FetchFileToLocalTempAsync ( string remoteRPath, string localRPath, CancellationToken cancellationToken ) : Task
remoteRPath string
localRPath string
cancellationToken System.Threading.CancellationToken
return Task

SendBytesAsync() public method

Sends a block of data to R-Host by creating a new blob. This method adds the blob for clean up by default.
public SendBytesAsync ( byte data, bool doCleanUp, IProgress progress, CancellationToken cancellationToken ) : Task
data byte Block of data to be sent.
doCleanUp bool /// true to add blob created upon transfer for cleanup on dispose, false to ignore it after transfer. ///
progress IProgress
cancellationToken System.Threading.CancellationToken
return Task

SendFileAsync() public method

Sends file to R-Host by creating a new blob. This method adds the blob for clean up by default.
public SendFileAsync ( string filePath, bool doCleanUp, IProgress progress, CancellationToken cancellationToken ) : Task
filePath string Path to the file to be sent to R-Host.
doCleanUp bool /// true to add blob created upon transfer for cleanup on dispose, false to ignore it after transfer. ///
progress IProgress
cancellationToken System.Threading.CancellationToken
return Task