CrossSection view model was improved
This commit is contained in:
@@ -12,15 +12,18 @@ namespace StructureHelperCommon.Models
|
||||
public int ShiftPriority { get; set; }
|
||||
|
||||
public List<ITraceLoggerEntry> TraceLoggerEntries => Logger.TraceLoggerEntries;
|
||||
public bool KeepErrorStatus { get => Logger.KeepErrorStatus; set => Logger.KeepErrorStatus = value; }
|
||||
|
||||
public ShiftTraceLogger(ITraceLogger logger)
|
||||
{
|
||||
Logger = logger;
|
||||
KeepErrorStatus = true;
|
||||
}
|
||||
public ShiftTraceLogger() : this(new TraceLogger()) { }
|
||||
public void AddMessage(string message, TraceLogStatuses status = TraceLogStatuses.Info, int shiftPrioriry = 0)
|
||||
{
|
||||
// if status in (fatal, error, warning) they must be kept as they are
|
||||
if (status <= TraceLogStatuses.Warning)
|
||||
if (status <= TraceLogStatuses.Warning & KeepErrorStatus == true)
|
||||
{
|
||||
Logger.AddMessage(message, status);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user