From 3d961c6691e79b2a5275b714124fdc542aa6b015 Mon Sep 17 00:00:00 2001 From: Michael Becker Date: Sat, 6 Feb 2021 22:42:21 -0500 Subject: [PATCH] return ShortName if UniqueName has not yet been set --- MBS.Framework/Application.cs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/MBS.Framework/Application.cs b/MBS.Framework/Application.cs index 9020686..1082a7b 100644 --- a/MBS.Framework/Application.cs +++ b/MBS.Framework/Application.cs @@ -28,7 +28,24 @@ namespace MBS.Framework public static Application Instance { get; set; } = null; public Guid ID { get; set; } = Guid.Empty; - public string UniqueName { get; set; } = null; + + private string _UniqueName = null; + public string UniqueName + { + get + { + if (_UniqueName == null) + { + return ShortName; + } + return _UniqueName; + } + set + { + _UniqueName = value; + } + } + public string ShortName { get; set; } public string Title { get; set; } = String.Empty; public int ExitCode { get; protected set; } = 0;