diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2025-07-29 00:54:47 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2025-07-29 00:54:47 +0300 |
| commit | 70f9f4dcbe3d4537ff2bd503f18288b9a7b0e19e (patch) | |
| tree | ab7c70dbe23c04e9e6ea9a165b6840e0b2ed1df7 /Software/Visual_Studio/Tango.Telemetry/TelemetryPublisherConfiguration.cs | |
| parent | d70056692f43b2a39dbaefebe7c6e096a1205fb4 (diff) | |
| download | Tango-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.cs | 33 |
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."); + } + } +} |
