aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-11-25 16:39:01 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-11-25 16:39:01 +0200
commit78c93e2ee1eddff67554edec9f956536a0b61482 (patch)
tree208e8f9c368cfa324e255493bb287e50b79b04fa /Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore
parentca18248f6203d7567a2276ec76360aedd4cfda0b (diff)
downloadTango-78c93e2ee1eddff67554edec9f956536a0b61482.tar.gz
Tango-78c93e2ee1eddff67554edec9f956536a0b61482.zip
Working on Backup/Restore...
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupFile.cs37
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupMode.cs13
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupRestoreEventArgs.cs16
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupRestoreProgressEventArgs.cs27
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupRestoreStage.cs3
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupSettings.cs11
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/IBackupManager.cs5
7 files changed, 89 insertions, 23 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupFile.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupFile.cs
index 42e6fec42..4425aad9e 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupFile.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupFile.cs
@@ -7,21 +7,58 @@ using Tango.Web;
namespace Tango.PPC.Common.BackupRestore
{
+ /// <summary>
+ /// Represents a backup file record.
+ /// </summary>
public class BackupFile
{
+ /// <summary>
+ /// Gets or sets the backup name.
+ /// </summary>
public String Name { get; set; }
+
+ /// <summary>
+ /// Gets or sets the creation date.
+ /// </summary>
public DateTime Date { get; set; }
+
+ /// <summary>
+ /// Gets or sets the machine serial number.
+ /// </summary>
public String MachineSerialNumber { get; set; }
+ /// <summary>
+ /// Gets or sets the application version.
+ /// </summary>
public String ApplicationVersion { get; set; }
+
+ /// <summary>
+ /// Gets or sets the firmware version.
+ /// </summary>
public String FirmwareVersion { get; set; }
+
+ /// <summary>
+ /// Gets or sets the settings file.
+ /// </summary>
public String SettingsFile { get; set; }
+ /// <summary>
+ /// Gets or sets the job files.
+ /// </summary>
+ public List<String> JobFiles { get; set; }
+
+ /// <summary>
+ /// Gets or sets the backup settings.
+ /// </summary>
public BackupSettings Settings { get; set; }
+ /// <summary>
+ /// Initializes a new instance of the <see cref="BackupFile"/> class.
+ /// </summary>
public BackupFile()
{
Settings = new BackupSettings();
+ JobFiles = new List<string>();
}
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupMode.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupMode.cs
index 5e2f6d168..8533ce22a 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupMode.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupMode.cs
@@ -6,7 +6,18 @@ using System.Threading.Tasks;
namespace Tango.PPC.Common.BackupRestore
{
- class BackupMode
+ /// <summary>
+ /// Represents a backup mode.
+ /// </summary>
+ public enum BackupMode
{
+ /// <summary>
+ /// Jobs only backup.
+ /// </summary>
+ Jobs,
+ /// <summary>
+ /// Complete backup of data, app binaries, firmware and settings file.
+ /// </summary>
+ Full,
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupRestoreEventArgs.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupRestoreEventArgs.cs
deleted file mode 100644
index 402db821a..000000000
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupRestoreEventArgs.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Tango.PPC.Common.BackupRestore
-{
- public class BackupRestoreEventArgs : EventArgs
- {
- public bool IsIntermediate { get; set; }
- public double Progress { get; set; }
- public double MaxProgress { get; set; }
- public BackupRestoreStage Stage { get; set; }
- }
-}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupRestoreProgressEventArgs.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupRestoreProgressEventArgs.cs
index 402db821a..9508755cb 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupRestoreProgressEventArgs.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupRestoreProgressEventArgs.cs
@@ -6,11 +6,36 @@ using System.Threading.Tasks;
namespace Tango.PPC.Common.BackupRestore
{
- public class BackupRestoreEventArgs : EventArgs
+ /// <summary>
+ /// Represents a backup restore procedure progress.
+ /// </summary>
+ /// <seealso cref="System.EventArgs" />
+ public class BackupRestoreProgressEventArgs : EventArgs
{
+ /// <summary>
+ /// Gets or sets a value indicating whether the progress is intermediate.
+ /// </summary>
public bool IsIntermediate { get; set; }
+
+ /// <summary>
+ /// Gets or sets the progress value.
+ /// </summary>
public double Progress { get; set; }
+
+
+ /// <summary>
+ /// Gets or sets the maximum progress.
+ /// </summary>
public double MaxProgress { get; set; }
+
+ /// <summary>
+ /// Gets or sets the progress stage.
+ /// </summary>
public BackupRestoreStage Stage { get; set; }
+
+ /// <summary>
+ /// Gets or sets the message.
+ /// </summary>
+ public String Message { get; set; }
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupRestoreStage.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupRestoreStage.cs
index 4ffad3c95..efef2d4d0 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupRestoreStage.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupRestoreStage.cs
@@ -7,6 +7,9 @@ using System.Threading.Tasks;
namespace Tango.PPC.Common.BackupRestore
{
+ /// <summary>
+ /// Represents a backup restore procedure stage.
+ /// </summary>
public enum BackupRestoreStage
{
[Description("Initializing")]
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupSettings.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupSettings.cs
index d1225a609..b2021ba39 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupSettings.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/BackupSettings.cs
@@ -6,11 +6,14 @@ using System.Threading.Tasks;
namespace Tango.PPC.Common.BackupRestore
{
+ /// <summary>
+ /// Represents a backup settings.
+ /// </summary>
public class BackupSettings
{
- public bool IncludeDatabase { get; set; }
- public bool IncludeApplication { get; set; }
- public bool IncludeFirmware { get; set; }
- public bool IncludeSettings { get; set; }
+ /// <summary>
+ /// Gets or sets the backup mode.
+ /// </summary>
+ public BackupMode Mode { get; set; }
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/IBackupManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/IBackupManager.cs
index 60baceb5c..a50f0ab60 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/IBackupManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/BackupRestore/IBackupManager.cs
@@ -6,12 +6,15 @@ using System.Threading.Tasks;
namespace Tango.PPC.Common.BackupRestore
{
+ /// <summary>
+ /// Represents a backup/restore manager.
+ /// </summary>
public interface IBackupManager
{
/// <summary>
/// Occurs when the backup/restore procedure makes progress.
/// </summary>
- event EventHandler<BackupRestoreEventArgs> Progress;
+ event EventHandler<BackupRestoreProgressEventArgs> Progress;
/// <summary>
/// Creates a backup file containing database, application and firmware versions.