File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed
source/VersionHandlerImpl/src Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -25,26 +25,43 @@ namespace Google {
25
25
/// </summary>
26
26
internal class ExecutionEnvironment {
27
27
28
+ /// <summary>
29
+ /// Cached lower case CommandLine
30
+ /// </summary>
31
+ private static string Cached_Environment_CommandLine_Lower = null ;
32
+
33
+ /// <summary>
34
+ /// Get/Set cached lower case CommandLine
35
+ /// </summary>
36
+ public static string Environment_CommandLine_Lower {
37
+ get {
38
+ if ( Cached_Environment_CommandLine_Lower != null ) {
39
+ Cached_Environment_CommandLine_Lower = Environment . CommandLine . ToLower ( ) ;
40
+ }
41
+ return Cached_Environment_CommandLine_Lower ;
42
+ }
43
+ }
44
+
28
45
/// <summary>
29
46
/// Whether the editor was started in batch mode.
30
47
/// </summary>
31
48
public static bool InBatchMode {
32
- get { return Environment . CommandLine . ToLower ( ) . Contains ( "-batchmode" ) ; }
49
+ get { return Environment_CommandLine_Lower . Contains ( "-batchmode" ) ; }
33
50
}
34
51
35
52
/// <summary>
36
53
/// Whether the editor was started with a method to executed.
37
54
/// </summary>
38
55
public static bool ExecuteMethodEnabled {
39
- get { return Environment . CommandLine . ToLower ( ) . Contains ( "-executemethod" ) ; }
56
+ get { return Environment_CommandLine_Lower . Contains ( "-executemethod" ) ; }
40
57
}
41
58
42
59
/// <summary>
43
60
/// Whether the UI should be treated as interactive.
44
61
/// </summary>
45
62
internal static bool InteractiveMode {
46
63
get {
47
- return ! ( Environment . CommandLine . ToLower ( ) . Contains ( "-gvh_noninteractive" ) ||
64
+ return ! ( Environment_CommandLine_Lower . Contains ( "-gvh_noninteractive" ) ||
48
65
ExecutionEnvironment . InBatchMode ) ;
49
66
}
50
67
}
You can’t perform that action at this time.
0 commit comments