Style fixes
This commit is contained in:
parent
e711c5dcc3
commit
67b29151f6
|
@ -7,8 +7,8 @@ using System.Collections.ObjectModel;
|
|||
using System.IO;
|
||||
using System.Management.Automation;
|
||||
using System.Management.Automation.Internal;
|
||||
using System.Threading.Tasks;
|
||||
using System.Security;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.PowerShell.MarkdownRender;
|
||||
using Dbg = System.Management.Automation;
|
||||
|
||||
|
@ -151,7 +151,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
return mdContent;
|
||||
}
|
||||
}
|
||||
catch(FileNotFoundException fnfe)
|
||||
catch (FileNotFoundException fnfe)
|
||||
{
|
||||
errorRecord = new ErrorRecord(
|
||||
fnfe,
|
||||
|
@ -159,7 +159,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
ErrorCategory.ResourceUnavailable,
|
||||
filePath);
|
||||
}
|
||||
catch(SecurityException se)
|
||||
catch (SecurityException se)
|
||||
{
|
||||
errorRecord = new ErrorRecord(
|
||||
se,
|
||||
|
@ -167,7 +167,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
ErrorCategory.SecurityError,
|
||||
filePath);
|
||||
}
|
||||
catch(UnauthorizedAccessException uae)
|
||||
catch (UnauthorizedAccessException uae)
|
||||
{
|
||||
errorRecord = new ErrorRecord(
|
||||
uae,
|
||||
|
|
|
@ -44,8 +44,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
/// </summary>
|
||||
protected override void BeginProcessing()
|
||||
{
|
||||
//if (!this.MyInvocation.BoundParameters.ContainsKey("UseBrowser"))
|
||||
if(!UseBrowser.IsPresent)
|
||||
if (!UseBrowser.IsPresent)
|
||||
{
|
||||
// Since UseBrowser is not bound, we use proxy to Out-Default
|
||||
stepPipe = ScriptBlock.Create(@"Microsoft.PowerShell.Core\Out-Default @PSBoundParameters").GetSteppablePipeline(this.MyInvocation.CommandOrigin);
|
||||
|
@ -60,7 +59,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
{
|
||||
object inpObj = InputObject.BaseObject;
|
||||
|
||||
if(inpObj is MarkdownInfo markdownInfo)
|
||||
if (inpObj is MarkdownInfo markdownInfo)
|
||||
{
|
||||
if (UseBrowser)
|
||||
{
|
||||
|
|
|
@ -82,7 +82,7 @@ namespace Microsoft.PowerShell.MarkdownRender
|
|||
{
|
||||
var propName = propertyName?.ToLower();
|
||||
|
||||
switch(propName)
|
||||
switch (propName)
|
||||
{
|
||||
case "header1":
|
||||
return string.Concat(Esc, Header1, Header1, Esc, EndSequence);
|
||||
|
@ -337,7 +337,7 @@ namespace Microsoft.PowerShell.MarkdownRender
|
|||
{
|
||||
var text = altText;
|
||||
|
||||
if(string.IsNullOrEmpty(altText))
|
||||
if (string.IsNullOrEmpty(altText))
|
||||
{
|
||||
text = "Image";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue