From 90054145f2cd335978d930ce2e395a538e6c5059 Mon Sep 17 00:00:00 2001 From: Niko Ehrenfeuchter <nikolaus.ehrenfeuchter@unibas.ch> Date: Thu, 25 Apr 2019 14:52:23 +0200 Subject: [PATCH] Extend DriveToCheck for a runtime-property holding the free space Refers to #20 --- ATxCommon/Serializables/DriveToCheck.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ATxCommon/Serializables/DriveToCheck.cs b/ATxCommon/Serializables/DriveToCheck.cs index 6411bdb..a836ec3 100644 --- a/ATxCommon/Serializables/DriveToCheck.cs +++ b/ATxCommon/Serializables/DriveToCheck.cs @@ -1,4 +1,6 @@ -namespace ATxCommon.Serializables +using System.Xml.Serialization; + +namespace ATxCommon.Serializables { /// <summary> /// Helper class for the nested SpaceMonitoring sections. @@ -14,5 +16,11 @@ /// Limit (in GB) of free space, lower values will trigger a notification. /// </summary> public long SpaceThreshold { get; set; } + + /// <summary> + /// Free space of a drive in bytes, set to -1 if unknown or check resulted in an error. + /// </summary> + [XmlIgnore] + public long FreeSpace { get; set; } = -1; } } \ No newline at end of file -- GitLab