C# Class Examples.ExamplesFileTransfer.WPF.ReceivedFile

A local class which can be used to populate the WPF list box
Inheritance: INotifyPropertyChanged
Afficher le fichier Open project: MarcFletcher/NetworkComms.Net Class Usage Examples

Méthodes publiques

Méthode Description
AddData ( long dataStart, int bufferStart, int bufferLength, byte buffer ) : void

Add data to file

Close ( ) : void

Closes and releases any resources maintained by this file

ReceivedFile ( string filename, ConnectionInfo sourceInfo, long sizeBytes ) : System

Create a new ReceivedFile

SaveFileToDisk ( string saveLocation ) : void

Saves the completed file to the provided saveLocation

Private Methods

Méthode Description
NotifyPropertyChanged ( string propertyName = "" ) : void

Triggers a GUI update on a property change

Method Details

AddData() public méthode

Add data to file
public AddData ( long dataStart, int bufferStart, int bufferLength, byte buffer ) : void
dataStart long Where to start writing this data to the internal memoryStream
bufferStart int Where to start copying data from buffer
bufferLength int The number of bytes to copy from buffer
buffer byte Buffer containing data to add
Résultat void

Close() public méthode

Closes and releases any resources maintained by this file
public Close ( ) : void
Résultat void

ReceivedFile() public méthode

Create a new ReceivedFile
public ReceivedFile ( string filename, ConnectionInfo sourceInfo, long sizeBytes ) : System
filename string Filename associated with this file
sourceInfo ConnectionInfo ConnectionInfo corresponding with the file source
sizeBytes long The total size in bytes of this file
Résultat System

SaveFileToDisk() public méthode

Saves the completed file to the provided saveLocation
public SaveFileToDisk ( string saveLocation ) : void
saveLocation string Location to save file
Résultat void