Skip to content

Commit 492be51

Browse files
Joel BennettJoel Bennett
authored andcommitted
Remove commented code
1 parent 939b53b commit 492be51

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

HostIOInterceptor.cs

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public void AttachToHost(PSHost host)
111111
externalUI = (PSHostUserInterface)externalUIField.GetValue(ui);
112112
externalUIField.SetValue(ui, this);
113113
}
114-
114+
115115
this.host = host;
116116
}
117117

@@ -190,7 +190,7 @@ public override PSCredential PromptForCredential(string caption,
190190
{
191191
throw new InvalidOperationException("Unable to prompt user for credential in headless session");
192192
}
193-
193+
194194
PSCredential result = externalUI.PromptForCredential(caption, message, userName, targetName);
195195

196196
SendToSubscribers(s => s.CredentialPrompt(result));
@@ -328,11 +328,6 @@ public override void WriteErrorLine(string message)
328328

329329
public override void WriteLine()
330330
{
331-
// if (externalUI == null)
332-
// {
333-
// throw new InvalidOperationException();
334-
// }
335-
336331
string[] lines = writeCache.ToString().Split(new[] { "\r\n", "\n" }, StringSplitOptions.None);
337332
foreach (string line in lines)
338333
{
@@ -348,11 +343,6 @@ public override void WriteLine()
348343

349344
public override void WriteLine(string value)
350345
{
351-
// if (externalUI == null)
352-
// {
353-
// throw new InvalidOperationException();
354-
// }
355-
356346
string[] lines = (writeCache + value).Split(new[] { "\r\n", "\n" }, StringSplitOptions.None);
357347
foreach (string line in lines)
358348
{
@@ -368,11 +358,6 @@ public override void WriteLine(string value)
368358

369359
public override void WriteLine(ConsoleColor foregroundColor, ConsoleColor backgroundColor, string value)
370360
{
371-
// if (externalUI == null)
372-
// {
373-
// throw new InvalidOperationException();
374-
// }
375-
376361
string[] lines = (writeCache + value).Split(new[] { "\r\n", "\n" }, StringSplitOptions.None);
377362
foreach (string line in lines)
378363
{

0 commit comments

Comments
 (0)