Files

51 lines
2.0 KiB
C#
Raw Permalink Normal View History

2026-04-17 14:55:32 -04:00
using System;
namespace DatabaseImport
{
/// <summary>
/// this is a lightweight version of test TestTemplate, holding just the essential information
/// [updated]: this concept is already present in testtemplate,
/// by default it only loads information in the tblTestSetup, and then uses the IsLoaded flag to
/// check whether it's populated information from other tables or not.
/// I'll leave the class here for now in case we want to expand on it in the future, also I cleaned up a few things in the process anyhow
/// </summary>
public class TestTemplateLite : ITestSetup
{
public string Name { get; set; }
public string Description { get; set; } = "";
public RecordingModes RecordingMode { get; set; }
private double _preTriggerSeconds;
public double PreTriggerSeconds
{
get
{
switch (RecordingMode)
{
case RecordingModes.Recorder:
case RecordingModes.HybridRecorder:
return 0D;
case RecordingModes.CircularBuffer:
return _preTriggerSeconds;
default:
return _preTriggerSeconds;
}
}
set => _preTriggerSeconds = value;
}
public string ErrorMessage { get; set; } = string.Empty;
/// <summary>
/// returns the error messages for a test setup
/// calculated at the same time is complete is calculated, however doesn't have a check against
/// is dirty, like IsComplete does ...
/// </summary>
public string CompletionErrorMessage => ErrorMessage.Length > 250 ? ErrorMessage.Substring(0, 250) : ErrorMessage;
public double PostTriggerSeconds { get; set; }
public DateTime LastModified { get; set; }
public string LastModifiedBy { get; set; }
public bool IsComplete { get; set; }
}
}