2020-03-24 11:08:37 -07:00
|
|
|
// Copyright (c) Microsoft Corporation.
|
2018-02-13 09:23:53 -08:00
|
|
|
// Licensed under the MIT License.
|
2016-03-30 14:20:52 -07:00
|
|
|
|
|
|
|
|
namespace System.Management.Automation
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Defines the names of the internal providers.
|
2017-01-16 13:31:14 -08:00
|
|
|
/// Derived classes exist for custom and single shells. In the single
|
2016-03-30 14:20:52 -07:00
|
|
|
/// shell the provider name includes the PSSnapin name. In custom
|
|
|
|
|
/// shells it does not.
|
|
|
|
|
/// </summary>
|
|
|
|
|
internal abstract class ProviderNames
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2019-01-06 04:40:24 +05:00
|
|
|
/// Gets the name of the EnvironmentProvider.
|
2016-03-30 14:20:52 -07:00
|
|
|
/// </summary>
|
|
|
|
|
internal abstract string Environment { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2019-01-06 04:40:24 +05:00
|
|
|
/// Gets the name of the Certificate.
|
2016-03-30 14:20:52 -07:00
|
|
|
/// </summary>
|
|
|
|
|
internal abstract string Certificate { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2019-01-06 04:40:24 +05:00
|
|
|
/// Gets the name of the VariableProvider.
|
2016-03-30 14:20:52 -07:00
|
|
|
/// </summary>
|
|
|
|
|
internal abstract string Variable { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2019-01-06 04:40:24 +05:00
|
|
|
/// Gets the name of the AliasProvider.
|
2016-03-30 14:20:52 -07:00
|
|
|
/// </summary>
|
|
|
|
|
internal abstract string Alias { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2019-01-06 04:40:24 +05:00
|
|
|
/// Gets the name of the FunctionProvider.
|
2016-03-30 14:20:52 -07:00
|
|
|
/// </summary>
|
|
|
|
|
internal abstract string Function { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2019-01-06 04:40:24 +05:00
|
|
|
/// Gets the name of the FileSystemProvider.
|
2016-03-30 14:20:52 -07:00
|
|
|
/// </summary>
|
|
|
|
|
internal abstract string FileSystem { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2019-01-06 04:40:24 +05:00
|
|
|
/// Gets the name of the RegistryProvider.
|
2016-03-30 14:20:52 -07:00
|
|
|
/// </summary>
|
|
|
|
|
internal abstract string Registry { get; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2019-01-06 04:40:24 +05:00
|
|
|
/// The provider names for the single shell.
|
2016-03-30 14:20:52 -07:00
|
|
|
/// </summary>
|
|
|
|
|
internal class SingleShellProviderNames : ProviderNames
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2019-01-06 04:40:24 +05:00
|
|
|
/// Gets the name of the EnvironmentProvider.
|
2016-03-30 14:20:52 -07:00
|
|
|
/// </summary>
|
2016-07-29 13:02:49 -07:00
|
|
|
internal override string Environment
|
|
|
|
|
{
|
2016-03-30 14:20:52 -07:00
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return "Microsoft.PowerShell.Core\\Environment";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2019-01-06 04:40:24 +05:00
|
|
|
/// Gets the name of the Certificate.
|
2016-03-30 14:20:52 -07:00
|
|
|
/// </summary>
|
2016-07-29 13:02:49 -07:00
|
|
|
internal override string Certificate
|
|
|
|
|
{
|
2016-03-30 14:20:52 -07:00
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return "Microsoft.PowerShell.Security\\Certificate";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2019-01-06 04:40:24 +05:00
|
|
|
/// Gets the name of the VariableProvider.
|
2016-03-30 14:20:52 -07:00
|
|
|
/// </summary>
|
2016-07-29 13:02:49 -07:00
|
|
|
internal override string Variable
|
|
|
|
|
{
|
2016-03-30 14:20:52 -07:00
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return "Microsoft.PowerShell.Core\\Variable";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2019-01-06 04:40:24 +05:00
|
|
|
/// Gets the name of the AliasProvider.
|
2016-03-30 14:20:52 -07:00
|
|
|
/// </summary>
|
2016-07-29 13:02:49 -07:00
|
|
|
internal override string Alias
|
|
|
|
|
{
|
2016-03-30 14:20:52 -07:00
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return "Microsoft.PowerShell.Core\\Alias";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2019-01-06 04:40:24 +05:00
|
|
|
/// Gets the name of the FunctionProvider.
|
2016-03-30 14:20:52 -07:00
|
|
|
/// </summary>
|
2016-07-29 13:02:49 -07:00
|
|
|
internal override string Function
|
|
|
|
|
{
|
2016-03-30 14:20:52 -07:00
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return "Microsoft.PowerShell.Core\\Function";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2019-01-06 04:40:24 +05:00
|
|
|
/// Gets the name of the FileSystemProvider.
|
2016-03-30 14:20:52 -07:00
|
|
|
/// </summary>
|
2016-07-29 13:02:49 -07:00
|
|
|
internal override string FileSystem
|
|
|
|
|
{
|
2016-03-30 14:20:52 -07:00
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return "Microsoft.PowerShell.Core\\FileSystem";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2019-01-06 04:40:24 +05:00
|
|
|
/// Gets the name of the RegistryProvider.
|
2016-03-30 14:20:52 -07:00
|
|
|
/// </summary>
|
2016-07-29 13:02:49 -07:00
|
|
|
internal override string Registry
|
|
|
|
|
{
|
2016-03-30 14:20:52 -07:00
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return "Microsoft.PowerShell.Core\\Registry";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|