diff --git a/src/System.Management.Automation/engine/ExperimentalFeature/ExperimentalFeature.cs b/src/System.Management.Automation/engine/ExperimentalFeature/ExperimentalFeature.cs
index 49c17dba1f..4cd505fe4d 100644
--- a/src/System.Management.Automation/engine/ExperimentalFeature/ExperimentalFeature.cs
+++ b/src/System.Management.Automation/engine/ExperimentalFeature/ExperimentalFeature.cs
@@ -46,8 +46,12 @@ namespace System.Management.Automation
public bool Enabled { get; private set; }
///
- /// Constructor for ExperimentalFeature.
+ /// Initializes a new instance of the class.
///
+ /// The name of the experimental feature.
+ /// A description of the experimental feature.
+ /// The source where the experimental feature is defined.
+ /// Indicate whether the experimental feature is enabled.
internal ExperimentalFeature(string name, string description, string source, bool isEnabled)
{
Name = name;
@@ -56,6 +60,17 @@ namespace System.Management.Automation
Enabled = isEnabled;
}
+ ///
+ /// Initializes a new instance of the class.
+ /// This is a private constructor only for declaring new experimental features within this type.
+ ///
+ /// The name of the experimental feature.
+ /// A description of the experimental feature.
+ private ExperimentalFeature(string name, string description)
+ : this(name, description, source: EngineSource, isEnabled: false)
+ {
+ }
+
#endregion
#region Static Members
@@ -85,25 +100,17 @@ namespace System.Management.Automation
/* Register engine experimental features here. Follow the same pattern as the example:
new ExperimentalFeature(
name: "PSFileSystemProviderV2",
- description: "Replace the old FileSystemProvider with cleaner design and faster code",
- source: EngineSource,
- isEnabled: false),
+ description: "Replace the old FileSystemProvider with cleaner design and faster code"),
*/
new ExperimentalFeature(
name: "PSImplicitRemotingBatching",
- description: "Batch implicit remoting proxy commands to improve performance",
- source: EngineSource,
- isEnabled: false),
+ description: "Batch implicit remoting proxy commands to improve performance"),
new ExperimentalFeature(
name: "PSUseAbbreviationExpansion",
- description: "Allow tab completion of cmdlets and functions by abbreviation",
- source: EngineSource,
- isEnabled: false),
+ description: "Allow tab completion of cmdlets and functions by abbreviation"),
new ExperimentalFeature(
name: "PSTempDrive",
- description: "Create TEMP: PS Drive mapped to user's temporary directory path",
- source: EngineSource,
- isEnabled: false),
+ description: "Create TEMP: PS Drive mapped to user's temporary directory path"),
};
EngineExperimentalFeatures = new ReadOnlyCollection(engineFeatures);