mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
[Feature] Address Feedback: make value tuple element types explicit
This commit is contained in:
@@ -1097,7 +1097,7 @@ namespace System.Management.Automation.Language
|
||||
}
|
||||
}
|
||||
|
||||
private static (string name, ExperimentAction action) GetFeatureNameAndAction(AttributeAst ast)
|
||||
private static (string, ExperimentAction) GetFeatureNameAndAction(AttributeAst ast)
|
||||
{
|
||||
var argValue0 = ast.PositionalArguments[0].Accept(s_cvv);
|
||||
var argValue1 = ast.PositionalArguments[1].Accept(s_cvv);
|
||||
@@ -1169,7 +1169,7 @@ namespace System.Management.Automation.Language
|
||||
"MethodCountCouldNotFindBest", ExtendedTypeSystem.MethodArgumentCountException, ".ctor", positionalArgCount);
|
||||
}
|
||||
|
||||
var (name, action) = GetFeatureNameAndAction(ast);
|
||||
(string name, ExperimentAction action) = GetFeatureNameAndAction(ast);
|
||||
return new ExperimentalAttribute(name, action);
|
||||
}
|
||||
|
||||
@@ -1183,7 +1183,7 @@ namespace System.Management.Automation.Language
|
||||
result = new ParameterAttribute();
|
||||
break;
|
||||
case 2:
|
||||
var (name, action) = GetFeatureNameAndAction(ast);
|
||||
(string name, ExperimentAction action) = GetFeatureNameAndAction(ast);
|
||||
result = new ParameterAttribute(name, action);
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace ExperimentalFeatureTest
|
||||
protected override void EndProcessing()
|
||||
{
|
||||
string message = $"Hello World {Name}.";
|
||||
if (ExperimentalFeature.HasEnabled("ExpTest.FeatureOne"))
|
||||
if (ExperimentalFeature.IsEnabled("ExpTest.FeatureOne"))
|
||||
{
|
||||
if (SwitchOne.IsPresent) { message += "-SwitchOne is on."; }
|
||||
if (SwitchTwo.IsPresent) { message += "-SwitchTwo is on."; }
|
||||
|
||||
Reference in New Issue
Block a user