@@ -152,7 +152,7 @@ public override Dictionary<string, PSObject> Prompt(string caption,
152
152
string message ,
153
153
Collection < FieldDescription > descriptions )
154
154
{
155
- if ( externalUI ! = null )
155
+ if ( externalUI = = null )
156
156
{
157
157
throw new InvalidOperationException ( "Unable to prompt user in headless session" ) ;
158
158
}
@@ -169,7 +169,7 @@ public override int PromptForChoice(string caption,
169
169
Collection < ChoiceDescription > choices ,
170
170
int defaultChoice )
171
171
{
172
- if ( externalUI ! = null )
172
+ if ( externalUI = = null )
173
173
{
174
174
throw new InvalidOperationException ( "Unable to prompt user for choice in headless session" ) ;
175
175
}
@@ -186,7 +186,7 @@ public override PSCredential PromptForCredential(string caption,
186
186
string userName ,
187
187
string targetName )
188
188
{
189
- if ( externalUI ! = null )
189
+ if ( externalUI = = null )
190
190
{
191
191
throw new InvalidOperationException ( "Unable to prompt user for credential in headless session" ) ;
192
192
}
@@ -205,7 +205,7 @@ public override PSCredential PromptForCredential(string caption,
205
205
PSCredentialTypes allowedCredentialTypes ,
206
206
PSCredentialUIOptions options )
207
207
{
208
- if ( externalUI ! = null )
208
+ if ( externalUI = = null )
209
209
{
210
210
throw new InvalidOperationException ( "Unable to prompt user for credential in headless session" ) ;
211
211
}
@@ -224,7 +224,7 @@ public override PSCredential PromptForCredential(string caption,
224
224
225
225
public override string ReadLine ( )
226
226
{
227
- if ( externalUI ! = null )
227
+ if ( externalUI = = null )
228
228
{
229
229
throw new InvalidOperationException ( "Unable to ReadLine from host in headless session" ) ;
230
230
}
@@ -238,12 +238,11 @@ public override string ReadLine()
238
238
239
239
public override SecureString ReadLineAsSecureString ( )
240
240
{
241
- if ( externalUI ! = null )
241
+ if ( externalUI = = null )
242
242
{
243
243
throw new InvalidOperationException ( "Unable to ReadLineAsSecureString from host in headless session" ) ;
244
244
}
245
245
246
-
247
246
return externalUI . ReadLineAsSecureString ( ) ;
248
247
}
249
248
0 commit comments