22
33public static partial class DiffTools
44{
5- public static ResolvedTool ? AddToolBasedOn ( DiffTool basedOn , string name , bool ? autoRefresh = null , bool ? isMdi = null , bool ? supportsText = null , bool ? requiresTarget = null , LaunchArguments ? launchArguments = null , string ? exePath = null , IEnumerable < string > ? binaryExtensions = null )
5+ public static ResolvedTool ? AddToolBasedOn ( DiffTool basedOn , string name , bool ? autoRefresh = null , bool ? isMdi = null , bool ? supportsText = null , bool ? requiresTarget = null , LaunchArguments ? launchArguments = null , string ? exePath = null , IEnumerable < string > ? binaryExtensions = null , bool ? createNoWindow = false )
66 {
77 var existing = resolved . SingleOrDefault ( _ => _ . Tool == basedOn ) ;
88 if ( existing == null )
@@ -18,26 +18,27 @@ public static partial class DiffTools
1818 requiresTarget ?? existing . RequiresTarget ,
1919 launchArguments ?? existing . LaunchArguments ,
2020 exePath ?? existing . ExePath ,
21- binaryExtensions ?? existing . BinaryExtensions ) ;
21+ binaryExtensions ?? existing . BinaryExtensions ,
22+ createNoWindow ?? existing . CreateNoWindow ) ;
2223 }
2324
24- public static ResolvedTool ? AddTool ( string name , bool autoRefresh , bool isMdi , bool supportsText , bool requiresTarget , IEnumerable < string > binaryExtensions , OsSupport osSupport ) =>
25- AddTool ( name , null , autoRefresh , isMdi , supportsText , requiresTarget , binaryExtensions , osSupport ) ;
25+ public static ResolvedTool ? AddTool ( string name , bool autoRefresh , bool isMdi , bool supportsText , bool requiresTarget , IEnumerable < string > binaryExtensions , OsSupport osSupport , bool createNoWindow ) =>
26+ AddTool ( name , null , autoRefresh , isMdi , supportsText , requiresTarget , binaryExtensions , osSupport , createNoWindow ) ;
2627
27- public static ResolvedTool ? AddTool ( string name , bool autoRefresh , bool isMdi , bool supportsText , bool requiresTarget , LaunchArguments launchArguments , string exePath , IEnumerable < string > binaryExtensions ) =>
28- AddInner ( name , null , autoRefresh , isMdi , supportsText , requiresTarget , binaryExtensions , exePath , launchArguments ) ;
28+ public static ResolvedTool ? AddTool ( string name , bool autoRefresh , bool isMdi , bool supportsText , bool requiresTarget , LaunchArguments launchArguments , string exePath , IEnumerable < string > binaryExtensions , bool createNoWindow ) =>
29+ AddInner ( name , null , autoRefresh , isMdi , supportsText , requiresTarget , binaryExtensions , exePath , launchArguments , createNoWindow ) ;
2930
30- static ResolvedTool ? AddTool ( string name , DiffTool ? diffTool , bool autoRefresh , bool isMdi , bool supportsText , bool requiresTarget , IEnumerable < string > binaryExtensions , OsSupport osSupport )
31+ static ResolvedTool ? AddTool ( string name , DiffTool ? diffTool , bool autoRefresh , bool isMdi , bool supportsText , bool requiresTarget , IEnumerable < string > binaryExtensions , OsSupport osSupport , bool createNoWindow )
3132 {
3233 if ( ! OsSettingsResolver . Resolve ( name , osSupport , out var exePath , out var launchArguments ) )
3334 {
3435 return null ;
3536 }
3637
37- return AddInner ( name , diffTool , autoRefresh , isMdi , supportsText , requiresTarget , binaryExtensions , exePath , launchArguments ) ;
38+ return AddInner ( name , diffTool , autoRefresh , isMdi , supportsText , requiresTarget , binaryExtensions , exePath , launchArguments , createNoWindow ) ;
3839 }
3940
40- static ResolvedTool ? AddInner ( string name , DiffTool ? diffTool , bool autoRefresh , bool isMdi , bool supportsText , bool requiresTarget , IEnumerable < string > binaries , string exePath , LaunchArguments launchArguments )
41+ static ResolvedTool ? AddInner ( string name , DiffTool ? diffTool , bool autoRefresh , bool isMdi , bool supportsText , bool requiresTarget , IEnumerable < string > binaries , string exePath , LaunchArguments launchArguments , bool createNoWindow )
4142 {
4243 Guard . AgainstEmpty ( name , nameof ( name ) ) ;
4344 if ( resolved . Any ( _ => _ . Name == name ) )
@@ -59,7 +60,8 @@ public static partial class DiffTools
5960 autoRefresh ,
6061 binaries . ToList ( ) ,
6162 requiresTarget ,
62- supportsText ) ;
63+ supportsText ,
64+ createNoWindow ) ;
6365
6466 AddResolvedToolAtStart ( tool ) ;
6567
@@ -95,7 +97,8 @@ static void InitTools(bool throwForNoTool, IEnumerable<DiffTool> order)
9597 definition . SupportsText ,
9698 definition . RequiresTarget ,
9799 definition . BinaryExtensions ,
98- definition . OsSupport ) ;
100+ definition . OsSupport ,
101+ definition . CreateNoWindow ) ;
99102 }
100103
101104 custom . Reverse ( ) ;
0 commit comments