mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Do not generate clean block in proxy function when the feature is disabled (#17112)
This commit is contained in:
@@ -864,6 +864,15 @@ dynamicparam
|
||||
", GetDynamicParamBlock());
|
||||
}
|
||||
|
||||
string cleanBlock = string.Empty;
|
||||
if (ExperimentalFeature.IsEnabled(ExperimentalFeature.PSCleanBlockFeatureName))
|
||||
{
|
||||
cleanBlock = string.Format(CultureInfo.InvariantCulture, @"
|
||||
clean
|
||||
{{{0}}}
|
||||
", GetCleanBlock());
|
||||
}
|
||||
|
||||
string result = string.Format(CultureInfo.InvariantCulture, @"{0}
|
||||
param({1})
|
||||
|
||||
@@ -875,9 +884,7 @@ process
|
||||
|
||||
end
|
||||
{{{5}}}
|
||||
|
||||
clean
|
||||
{{{6}}}
|
||||
{6}
|
||||
<#
|
||||
{7}
|
||||
#>
|
||||
@@ -888,7 +895,7 @@ clean
|
||||
GetBeginBlock(),
|
||||
GetProcessBlock(),
|
||||
GetEndBlock(),
|
||||
GetCleanBlock(),
|
||||
cleanBlock,
|
||||
CodeGeneration.EscapeBlockCommentContent(helpComment));
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user