Skip to content

Commit

Permalink
Update help for Az.Tools.Predictor (#14376)
Browse files Browse the repository at this point in the history
* Update help for Az.Tools.Predictor (#14374)

* update build.proj

* Change help folder
  • Loading branch information
dingmeng-xue authored and wyunchi-ms committed Mar 2, 2021
1 parent 593f57f commit 04ce323
Show file tree
Hide file tree
Showing 6 changed files with 161 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
namespace Microsoft.Azure.PowerShell.Tools.AzPredictor
{
/// <summary>
/// <para type="synopsis"> Cmdlet to disable Az Predictor and stop recieving suggestions</para>
/// <para type="description"> Use this cmdlet to disable Az Predictor and stop recieving suggestions</para>
/// <para type="synopsis">Cmdlet to disable Az Predictor and stop receiving suggestions</para>
/// <para type="description">Use this cmdlet to disable Az Predictor and stop receiving suggestions</para>
/// </summary>
[Cmdlet("Disable", "AzPredictor")]
public sealed class DisableAzPredictor : PSCmdlet
Expand All @@ -29,13 +29,13 @@ public sealed class DisableAzPredictor : PSCmdlet
};

/// <summary>
/// <para type="description"> Disable Az Predictor for the curent and future PowerShell sessions.</para>
/// <para type="description">Disable Az Predictor for the current and future PowerShell sessions.</para>
/// </summary>
[Parameter(Mandatory = false)]
public SwitchParameter AllSession { get; set; }

/// <summary>
/// <para type="description"> Indicates whether the user would like to receive output. </para>
/// <para type="description">Indicates whether the user would like to receive output.</para>
/// </summary>
[Parameter(Mandatory = false)]
public SwitchParameter PassThru { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
namespace Microsoft.Azure.PowerShell.Tools.AzPredictor
{
/// <summary>
/// <para type="synopsis"> Cmdlet to enable Az Predictor and start recieving suggestions</para>
/// <para type="description"> Use this cmdlet to enable Az Predictor and start recieving suggestions</para>
/// <para type="synopsis">Cmdlet to enable Az Predictor and start receiving suggestions</para>
/// <para type="description">Use this cmdlet to enable Az Predictor and start receiving suggestions</para>
/// </summary>
[Cmdlet("Enable", "AzPredictor"), OutputType(typeof(bool))]
public sealed class EnableAzPredictor : PSCmdlet
Expand All @@ -30,13 +30,13 @@ public sealed class EnableAzPredictor : PSCmdlet
};

/// <summary>
/// <para type="description"> Enable Az Predictor for the current and futrue PowerShell sessions.</para>
/// <para type="description">Enable Az Predictor for the current and future PowerShell sessions.</para>
/// </summary>
[Parameter(Mandatory = false)]
public SwitchParameter AllSession { get; set; }

/// <summary>
/// <para type="description"> Indicates whether the user would like to receive output. </para>
/// <para type="description">Indicates whether the user would like to receive output. </para>
/// </summary>
[Parameter(Mandatory = false)]
public SwitchParameter PassThru { get; set; }
Expand Down
6 changes: 3 additions & 3 deletions tools/Az.Tools.Predictor/GenerateHelp.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ Param(
[Parameter()]
[string]$ArtifactFolder,
[Parameter()]
[string]$HelpFolder,
[Parameter()]
[string]$ModuleName
)

$ModuleFolder = Join-Path -Path $ArtifactFolder -ChildPath $ModuleName
$TempDocFolder = Join-Path -Path $ArtifactFolder -ChildPath $ModuleName'.Doc'
Import-Module $ModuleFolder
New-MarkdownHelp -Module $ModuleName -OutputFolder $TempDocFolder
New-ExternalHelp –Path $TempDocFolder -OutputPath $ModuleFolder
New-ExternalHelp –Path $HelpFolder -OutputPath $ModuleFolder -Force -Debug
4 changes: 2 additions & 2 deletions tools/Az.Tools.Predictor/build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Target Name="Clean">
<Message Text="Clean artifacts folder" />
<RemoveDir Directories="$(ArtifactFolder)/$(ModuleName)" />
<RemoveDir Directories="$(ArtifactFolder)" />
<RemoveDir Directories="$(TestOutputDirectory)" />
</Target>

Expand All @@ -35,7 +35,7 @@
</Target>

<Target Name="GenerateHelp">
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;.\GenerateHelp -ArtifactFolder $(ArtifactFolder) -ModuleName $(ModuleName)" />
<Exec Command="$(PowerShellCoreCommandPrefix) &quot;$(RepoTools)/$(ModuleName)/GenerateHelp.ps1 -ArtifactFolder $(ArtifactFolder) -HelpFolder $(RepoTools)/$(ModuleName)/help -ModuleName $(ModuleName)" />
</Target>

<Target Name="Test" DependsOnTargets="Build">
Expand Down
74 changes: 74 additions & 0 deletions tools/Az.Tools.Predictor/help/Disable-AzPredictor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
external help file: Microsoft.Azure.PowerShell.Tools.AzPredictor.dll-Help.xml
Module Name: Az.Tools.Predictor
online version:
schema: 2.0.0
---

# Disable-AzPredictor

## SYNOPSIS
Cmdlet to disable Az Predictor and stop receiving suggestions.

## SYNTAX

```
Disable-AzPredictor [-AllSession] [-PassThru] [<CommonParameters>]
```

## DESCRIPTION
Use this cmdlet to disable Az Predictor and stop receiving suggestions.

## EXAMPLES

### Example 1
```
PS C:\> Disable-AzPredictor
```

Disable Az Predictor only for the current session.

## PARAMETERS

### -AllSession
Disable Az Predictor for the current and future PowerShell sessions.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -PassThru
Indicates whether the user would like to receive output.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Object
## NOTES
## RELATED LINKS
74 changes: 74 additions & 0 deletions tools/Az.Tools.Predictor/help/Enable-AzPredictor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
external help file: Microsoft.Azure.PowerShell.Tools.AzPredictor.dll-Help.xml
Module Name: Az.Tools.Predictor
online version:
schema: 2.0.0
---

# Enable-AzPredictor

## SYNOPSIS
Cmdlet to enable Az Predictor and start receiving suggestions.

## SYNTAX

```
Enable-AzPredictor [-AllSession] [-PassThru] [<CommonParameters>]
```

## DESCRIPTION
Use this cmdlet to enable Az Predictor and start receiving suggestions.

## EXAMPLES

### Example 1
```
PS C:\> Enable-AzPredictor
```

Enable Az Predictor for the current session.

## PARAMETERS

### -AllSession
Enable Az Predictor for the current and future PowerShell sessions.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### -PassThru
Indicates whether the user would like to receive output.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
### None
## OUTPUTS
### System.Boolean
## NOTES
## RELATED LINKS

0 comments on commit 04ce323

Please sign in to comment.