Closed chinhdo closed 9 years ago
Alright, this looks pretty solid and I think it's constructive change. Thanks again
Any issues with using WriteObject for informational messages? And WriteWarning (yellow text) for things like not being able to access a file while scanning?
WriteVerbose by default doesn't show up unless you have -verbose.
Thanks
WriteObject send object to pipeline, so it's for cmdlet output and not for info message.
In general Write-Verbose is better then Write-Host, see Jeffry's post http://www.jsnover.com/blog/2013/12/07/write-host-considered-harmful/ In our example, cmdlet doesn't have intention to be used in automation scenarios. I didn't find Write-Host C# counterpart. So it's probably ok to leave Console.WriteLine() for messages.
This is related to jumpstat -scan addition. I added a config entry named "Jump.Location.Scan.MaxSubFolders" to App.Config but the the code didn't see that because DLLs don't have their own config file. My work around is based on this article: http://stackoverflow.com/questions/17960/powershell-app-config