@@ -41,6 +41,11 @@ protected virtual void AppendSettings( StringBuilder stringBuilder )
4141 {
4242 stringBuilder . Append ( "--ci " ) ;
4343 }
44+
45+ if ( this . Timeout != null )
46+ {
47+ stringBuilder . Append ( $ "--timeout { this . Timeout } " ) ;
48+ }
4449 }
4550
4651 public override string ToString ( )
@@ -74,11 +79,11 @@ public override string ToString()
7479 [ Description ( "Simulate a continuous integration build by setting the build ContinuousIntegrationBuild property to TRUE." ) ]
7580 [ CommandOption ( "--ci" ) ]
7681 public bool SimulateContinuousIntegration { get ; set ; }
77-
82+
7883 [ Description ( "Use the project or solution directory as a working directory." ) ]
7984 [ CommandOption ( "--project-dir-as-working-dir" ) ]
8085 public bool UseProjectDirectoryAsWorkingDirectory { get ; set ; }
81-
86+
8287 [ Description ( "Use local dependencies instead of build server dependencies." ) ]
8388 [ CommandOption ( "--use-local-dependencies" ) ]
8489 public bool UseLocalDependencies { get ; set ; }
@@ -94,23 +99,26 @@ protected set
9499 this . _unparsedProperties = value ;
95100
96101 this . Properties = this . Properties . AddRange (
97- value . Select (
98- v =>
102+ value . Select ( v =>
103+ {
104+ var split = v . Split ( '=' ) ;
105+
106+ if ( split . Length > 1 )
99107 {
100- var split = v . Split ( '=' ) ;
101-
102- if ( split . Length > 1 )
103- {
104- return new KeyValuePair < string , string > ( split [ 0 ] . Trim ( ) , split [ 1 ] . Trim ( ) ) ;
105- }
106- else
107- {
108- return new KeyValuePair < string , string > ( split [ 0 ] . Trim ( ) , "True" ) ;
109- }
110- } ) ) ;
108+ return new KeyValuePair < string , string > ( split [ 0 ] . Trim ( ) , split [ 1 ] . Trim ( ) ) ;
109+ }
110+ else
111+ {
112+ return new KeyValuePair < string , string > ( split [ 0 ] . Trim ( ) , "True" ) ;
113+ }
114+ } ) ) ;
111115 }
112116 }
113117
118+ [ Description ( "Overrides the build timeout." ) ]
119+ [ CommandOption ( "--timeout" ) ]
120+ public int ? Timeout { get ; set ; }
121+
114122 public ImmutableDictionary < string , string > Properties { get ; protected set ; } =
115123 ImmutableDictionary . Create < string , string > ( StringComparer . OrdinalIgnoreCase ) ;
116124
0 commit comments