| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -22,14 +22,6 @@ public class ExperimentalFeature | |||
| 22 | 22 | ||
| 23 | 23 | internal const string EngineSource = "PSEngine"; | |
| 24 | 24 | ||
| 25 | - /// <summary> | ||
| 26 | - /// Experimental feature: Use culture invariant to-string convertor for lval in replace operator. | ||
| 27 | - /// </summary> | ||
| 28 | - public static readonly ExperimentalFeature PSCultureInvariantReplaceOperator = | ||
| 29 | - new ExperimentalFeature( | ||
| 30 | - name: nameof(PSCultureInvariantReplaceOperator), | ||
| 31 | - description: "Use culture invariant to-string convertor for lval in replace operator"); | ||
| 32 | - | ||
| 33 | 25 | #endregion | |
| 34 | 26 | ||
| 35 | 27 | #region Instance Members | |
@@ -125,7 +117,9 @@ static ExperimentalFeature() | |||
| 125 | 117 | new ExperimentalFeature( | |
| 126 | 118 | name: "PSNullConditionalOperators", | |
| 127 | 119 | description: "Support the null conditional member access operators in PowerShell language"), | |
| 128 | - PSCultureInvariantReplaceOperator, | ||
| 120 | + new ExperimentalFeature( | ||
| 121 | + name: "PSCultureInvariantReplaceOperator", | ||
| 122 | + description: "Use culture invariant to-string convertor for lval in replace operator"), | ||
| 129 | 123 | }; | |
| 130 | 124 | EngineExperimentalFeatures = new ReadOnlyCollection<ExperimentalFeature>(engineFeatures); | |
| 131 | 125 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -968,7 +968,7 @@ internal static object ReplaceOperator(ExecutionContext context, IScriptExtent e | |||
| 968 | 968 | if (list == null) | |
| 969 | 969 | { | |
| 970 | 970 | string lvalString; | |
| 971 | - if (ExperimentalFeature.PSCultureInvariantReplaceOperator.Enabled) | ||
| 971 | + if (ExperimentalFeature.IsEnabled("PSCultureInvariantReplaceOperator")) | ||
| 972 | 972 | { | |
| 973 | 973 | lvalString = PSObject.ToStringParser(context, lval) ?? string.Empty; | |
| 974 | 974 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -67,7 +67,7 @@ Describe "Replace Operator" -Tags CI { | |||
| 67 | 67 | ||
| 68 | 68 | Describe "Culture-invariance tests for -split and -replace" -Tags CI { | |
| 69 | 69 | BeforeAll { | |
| 70 | - $skipTest = -not [ExperimentalFeature]::PSCultureInvariantReplaceOperator.Enabled | ||
| 70 | + $skipTest = -not [ExperimentalFeature]::IsEnabled("PSCultureInvariantReplaceOperator") | ||
| 71 | 71 | if ($skipTest) { | |
| 72 | 72 | Write-Verbose "Test Suite Skipped. The test suite requires the experimental feature 'PSCultureInvariantReplaceOperator' to be enabled." -Verbose | |
| 73 | 73 | $originalDefaultParameterValues = $PSDefaultParameterValues.Clone() | |
| Back | FazBrowse Home | New Git URL |
0 commit comments