aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Telemetry/TelemetryPublisherConfiguration.cs
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2025-07-29 00:54:47 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2025-07-29 00:54:47 +0300
commit70f9f4dcbe3d4537ff2bd503f18288b9a7b0e19e (patch)
treeab7c70dbe23c04e9e6ea9a165b6840e0b2ed1df7 /Software/Visual_Studio/Tango.Telemetry/TelemetryPublisherConfiguration.cs
parentd70056692f43b2a39dbaefebe7c6e096a1205fb4 (diff)
downloadTango-70f9f4dcbe3d4537ff2bd503f18288b9a7b0e19e.tar.gz
Tango-70f9f4dcbe3d4537ff2bd503f18288b9a7b0e19e.zip
Tango.Telemetry v1
Diffstat (limited to 'Software/Visual_Studio/Tango.Telemetry/TelemetryPublisherConfiguration.cs')
-rw-r--r--Software/Visual_Studio/Tango.Telemetry/TelemetryPublisherConfiguration.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Telemetry/TelemetryPublisherConfiguration.cs b/Software/Visual_Studio/Tango.Telemetry/TelemetryPublisherConfiguration.cs
new file mode 100644
index 000000000..56f826591
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Telemetry/TelemetryPublisherConfiguration.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.BL.Enumerations;
+
+namespace Tango.Telemetry
+{
+ public class TelemetryPublisherConfiguration
+ {
+ public String MachineID { get; set; }
+ public MachineTypes MachineType { get; set; }
+ public String Environment { get; set; }
+ public TimeSpan DiagnosticsSamplingInterval { get; set; }
+ public TimeSpan PendingStorageCheckInterval { get; set; }
+ public List<ITelemetryDestination> TelemetryDestinations { get; private set; }
+
+ public TelemetryPublisherConfiguration()
+ {
+ TelemetryDestinations = new List<ITelemetryDestination>();
+
+ DiagnosticsSamplingInterval = TimeSpan.FromSeconds(10);
+ PendingStorageCheckInterval = TimeSpan.FromMinutes(1);
+ }
+
+ public void Validate()
+ {
+ if (!MachineID.IsNotNullOrEmpty()) throw new ArgumentNullException($"{nameof(MachineID)} is not set.");
+ if (!Environment.IsNotNullOrEmpty()) throw new ArgumentNullException($"{nameof(Environment)} is not set.");
+ }
+ }
+}