You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Source/Private/InvokeGenerator.ps1
+21-20Lines changed: 21 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -5,53 +5,54 @@ function InvokeGenerator {
5
5
.DESCRIPTION
6
6
This is an aspect-oriented programming approach for adding cross-cutting features to functions in a module.
7
7
8
-
The [ModuleBuilderGenerator] implementations are [AstVisitors] that return [TextReplace] object representing modifications to be performed on the source.
8
+
The [ModuleBuilderGenerator] implementations are [AstVisitors] that return [TextReplacement] objects representing modifications to be performed on the source.
9
9
#>
10
+
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter','Function', Justification ='PSSA reads the AST wrong')]
10
11
[CmdletBinding()]
11
12
param(
12
-
# The path to the RootModule psm1 to merge the aspect into
13
+
# The path to the RootModule psm1 to apply the Generator to
13
14
[Parameter(Mandatory,Position=0)]
14
15
[string]$RootModule,
15
16
16
17
# The name of the ModuleBuilder Generator to invoke.
17
-
# There are two built in:
18
-
# - MergeBlocks. Supports Before/After/Around blocks for aspects like error handling or authentication.
19
-
# - AddParameter. Supports adding common parameters to functions (usually in conjunction with MergeBlock that use those parameters)
18
+
# There are only two Generators built in:
19
+
# - ParameterGenerator. Supports adding parameters to functions in the module. Parameters come from a template file, which must be a script with a param block.
20
+
# - BlockGenerator. Supports adding code before, after, and around existing blocks for generators like error handling, authentication, and implementations for common parameters. The added blocks come from a template file, which must be a script with named begin/process/end blocks.
0 commit comments