File tree Expand file tree Collapse file tree 1 file changed +33
-20
lines changed
Expand file tree Collapse file tree 1 file changed +33
-20
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ public static partial class ProcessInfoHelper
55{
66 private static readonly FileVersionInfo _fileVersionInfo ;
77 private static readonly Process _process ;
8+ public static bool IsDebug { get ; set ; }
89 static ProcessInfoHelper ( )
910 {
1011 _process = Process . GetCurrentProcess ( ) ;
@@ -23,11 +24,14 @@ public static string VersionDev
2324 {
2425 get
2526 {
26- #if DEBUG
27- return "Dev" ;
28- #else
29- return GetVersion ( ) ? . ToString ( ) ;
30- #endif
27+ if ( IsDebug )
28+ {
29+ return "Dev" ;
30+ }
31+ else
32+ {
33+ return GetVersion ( ) ? . ToString ( ) ;
34+ }
3135 }
3236 }
3337
@@ -43,11 +47,14 @@ public static string VersionWithPrefixDev
4347 {
4448 get
4549 {
46- #if DEBUG
47- return "Dev" ;
48- #else
49- return $ "v{ Version } ";
50- #endif
50+ if ( IsDebug )
51+ {
52+ return "Dev" ;
53+ }
54+ else
55+ {
56+ return $ "v{ Version } ";
57+ }
5158 }
5259 }
5360
@@ -72,11 +79,14 @@ public static string ProductNameDev
7279 {
7380 get
7481 {
75- #if DEBUG
76- return ProductName + " Dev" ;
77- #else
78- return ProductName ;
79- #endif
82+ if ( IsDebug )
83+ {
84+ return ProductName + " Dev" ;
85+ }
86+ else
87+ {
88+ return ProductName ;
89+ }
8090 }
8191 }
8292
@@ -89,11 +99,14 @@ public static string ProductNameDisplayDev
8999 {
90100 get
91101 {
92- #if DEBUG
93- return ProductNameDisplay + " Dev" ;
94- #else
95- return ProductNameDisplay ;
96- #endif
102+ if ( IsDebug )
103+ {
104+ return ProductNameDisplay + " Dev" ;
105+ }
106+ else
107+ {
108+ return ProductNameDisplay ;
109+ }
97110 }
98111 }
99112
You can’t perform that action at this time.
0 commit comments