@@ -15,6 +15,9 @@ namespace Microsoft.Azure.Functions.PowerShellWorker.PowerShell.Host
1515 /// </summary>
1616 internal class HostUserInterface : PSHostUserInterface
1717 {
18+ /// <summary>
19+ /// The private reference of the logger.
20+ /// </summary>
1821 private RpcLogger _logger ;
1922
2023 /// <summary>
@@ -40,7 +43,7 @@ public HostUserInterface(RpcLogger logger)
4043 /// <param name="message">The text of the prompt.</param>
4144 /// <param name="descriptions">A collection of FieldDescription objects that
4245 /// describe each field of the prompt.</param>
43- /// <returns>Throws a NotImplementedException exception.</returns>
46+ /// <returns>Throws a NotImplementedException exception because we don't need a prompt .</returns>
4447 public override Dictionary < string , PSObject > Prompt ( string caption , string message , System . Collections . ObjectModel . Collection < FieldDescription > descriptions )
4548 {
4649 throw new NotImplementedException ( "The method or operation is not implemented." ) ;
@@ -55,7 +58,7 @@ public override Dictionary<string, PSObject> Prompt(string caption, string messa
5558 /// each choice.</param>
5659 /// <param name="defaultChoice">The index of the label in the Choices parameter
5760 /// collection. To indicate no default choice, set to -1.</param>
58- /// <returns>Throws a NotImplementedException exception.</returns>
61+ /// <returns>Throws a NotImplementedException exception because we don't need a prompt .</returns>
5962 public override int PromptForChoice ( string caption , string message , System . Collections . ObjectModel . Collection < ChoiceDescription > choices , int defaultChoice )
6063 {
6164 throw new NotImplementedException ( "The method or operation is not implemented." ) ;
@@ -69,7 +72,7 @@ public override int PromptForChoice(string caption, string message, System.Colle
6972 /// <param name="message">The text of the message.</param>
7073 /// <param name="userName">The user name whose credential is to be prompted for.</param>
7174 /// <param name="targetName">The name of the target for which the credential is collected.</param>
72- /// <returns>Throws a NotImplementedException exception.</returns>
75+ /// <returns>Throws a NotImplementedException exception because we don't need a prompt .</returns>
7376 public override PSCredential PromptForCredential ( string caption , string message , string userName , string targetName )
7477 {
7578 throw new NotImplementedException ( "The method or operation is not implemented." ) ;
@@ -88,7 +91,7 @@ public override PSCredential PromptForCredential(string caption, string message,
8891 /// identifies the type of credentials that can be returned.</param>
8992 /// <param name="options">A PSCredentialUIOptions constant that identifies the UI
9093 /// behavior when it gathers the credentials.</param>
91- /// <returns>Throws a NotImplementedException exception.</returns>
94+ /// <returns>Throws a NotImplementedException exception because we don't need a prompt .</returns>
9295 public override PSCredential PromptForCredential ( string caption , string message , string userName , string targetName , PSCredentialTypes allowedCredentialTypes , PSCredentialUIOptions options )
9396 {
9497 throw new NotImplementedException ( "The method or operation is not implemented." ) ;
@@ -98,7 +101,7 @@ public override PSCredential PromptForCredential(string caption, string message,
98101 /// Reads characters that are entered by the user until a newline
99102 /// (carriage return) is encountered.
100103 /// </summary>
101- /// <returns>The characters that are entered by the user .</returns>
104+ /// <returns>Throws a NotImplemented exception because we are in a non-interactive experience .</returns>
102105 public override string ReadLine ( )
103106 {
104107 throw new NotImplementedException ( "The method or operation is not implemented." ) ;
@@ -108,7 +111,7 @@ public override string ReadLine()
108111 /// Reads characters entered by the user until a newline (carriage return)
109112 /// is encountered and returns the characters as a secure string.
110113 /// </summary>
111- /// <returns>Throws a NotImplemented exception.</returns>
114+ /// <returns>Throws a NotImplemented exception because we are in a non-interactive experience .</returns>
112115 public override System . Security . SecureString ReadLineAsSecureString ( )
113116 {
114117 throw new NotImplementedException ( "The method or operation is not implemented." ) ;
@@ -161,7 +164,7 @@ public override void WriteErrorLine(string value)
161164 /// </summary>
162165 public override void WriteLine ( )
163166 {
164- //do nothing
167+ //do nothing because we don't need to log empty lines
165168 }
166169
167170 /// <summary>
@@ -203,7 +206,6 @@ public override void WriteProgress(long sourceId, ProgressRecord record)
203206 /// <param name="message">The verbose message that is displayed.</param>
204207 public override void WriteVerboseLine ( string message )
205208 {
206- //Console.WriteLine(String.Format(CultureInfo.CurrentCulture, "VERBOSE: {0}", message));
207209 _logger . LogTrace ( String . Format ( CultureInfo . CurrentCulture , "VERBOSE: {0}" , message ) ) ;
208210 }
209211
@@ -213,7 +215,6 @@ public override void WriteVerboseLine(string message)
213215 /// <param name="message">The warning message that is displayed.</param>
214216 public override void WriteWarningLine ( string message )
215217 {
216- //Console.WriteLine(String.Format(CultureInfo.CurrentCulture, "WARNING: {0}", message));
217218 _logger . LogWarning ( String . Format ( CultureInfo . CurrentCulture , "WARNING: {0}" , message ) ) ;
218219 }
219220 }
0 commit comments