File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,6 @@ object IPSConsoleReadLineMockableMethods.GetDynamicHelpContent(string commandNam
6767 . AddParameter ( "Parameter" , parameterName )
6868 . Invoke < PSObject > ( )
6969 . FirstOrDefault ( ) ;
70-
7170 }
7271 catch ( Exception )
7372 {
@@ -192,11 +191,13 @@ private void WriteDynamicHelpBlock(Collection<string> helpBlock)
192191
193192 private void WriteParameterHelp ( dynamic helpContent )
194193 {
194+ System . Diagnostics . Debug . Assert ( helpContent is not null ) ;
195+
195196 Collection < string > helpBlock ;
196197
197- if ( helpContent ? . Description is not string descriptionText )
198+ if ( helpContent . Description is not string descriptionText )
198199 {
199- descriptionText = helpContent ? . Description ? [ 0 ] ? . Text ;
200+ descriptionText = helpContent . Description ? [ 0 ] ? . Text ;
200201 }
201202
202203 if ( descriptionText is null )
@@ -209,7 +210,7 @@ private void WriteParameterHelp(dynamic helpContent)
209210 }
210211 else
211212 {
212- string syntax = $ "-{ helpContent . name } <{ helpContent . type . name } >";
213+ string syntax = $ "-{ helpContent . name } <{ helpContent . type ? . name } >";
213214 helpBlock = new Collection < string >
214215 {
215216 string . Empty ,
You can’t perform that action at this time.
0 commit comments