From 9c5f5c1351c78536b54df2c90742efae19f00b59 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 8 Aug 2018 17:28:34 +0300 Subject: Working on PPC machine setup ! --- .../Tango.MachineStudio.Common.csproj | 3 +- .../Update/FileStreamWrapper.cs | 56 ---------------------- 2 files changed, 1 insertion(+), 58 deletions(-) delete mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/FileStreamWrapper.cs (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj index 26517c82b..ef8d57885 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj @@ -116,7 +116,6 @@ - @@ -294,7 +293,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/FileStreamWrapper.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/FileStreamWrapper.cs deleted file mode 100644 index 83fbdf7ea..000000000 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Update/FileStreamWrapper.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Tango.MachineStudio.Common.Update -{ - /// - /// Represents a FileStream Wrapper dedicated for delivering Read/Write progress callbacks. - /// - /// - public class FileStreamWrapper : FileStream - { - private Action _callback; - - /// - /// Initializes a new instance of the class. - /// - /// Name of the file. - /// The mode. - /// The callback. - public FileStreamWrapper(String fileName, FileMode mode, Action callback) : base(fileName, mode) - { - _callback = callback; - } - - /// - /// Writes a block of bytes to the file stream. - /// - /// The buffer containing data to write to the stream. - /// The zero-based byte offset in from which to begin copying bytes to the stream. - /// The maximum number of bytes to write. - public override void Write(byte[] array, int offset, int count) - { - _callback?.Invoke(Length); - base.Write(array, offset, count); - } - - /// - /// Reads a block of bytes from the stream and writes the data in a given buffer. - /// - /// When this method returns, contains the specified byte array with the values between and ( + - 1 replaced by the bytes read from the current source. - /// The byte offset in at which the read bytes will be placed. - /// The maximum number of bytes to read. - /// - /// The total number of bytes read into the buffer. This might be less than the number of bytes requested if that number of bytes are not currently available, or zero if the end of the stream is reached. - /// - public override int Read(byte[] array, int offset, int count) - { - _callback?.Invoke(Position); - return base.Read(array, offset, count); - } - } -} -- cgit v1.3.1