mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-15 22:29:08 +00:00
This commit uses psl-monad branch source-depot 7209cb9 And corresponds to [SD:688741]
66 lines
1.9 KiB
C#
66 lines
1.9 KiB
C#
/********************************************************************++
|
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
--********************************************************************/
|
|
|
|
using System;
|
|
using System.Management.Automation.Runspaces;
|
|
|
|
namespace System.Management.Automation
|
|
{
|
|
/// <summary>
|
|
/// A variable that represents $PSCulture
|
|
/// </summary>
|
|
internal class PSCultureVariable : PSVariable
|
|
{
|
|
/// <summary>
|
|
/// Constructs an instance of the variable.
|
|
/// </summary>
|
|
internal PSCultureVariable()
|
|
: base(SpecialVariables.PSCulture, true, ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope,
|
|
RunspaceInit.DollarPSCultureDescription)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the value of the variable.
|
|
/// </summary>
|
|
///
|
|
public override object Value
|
|
{
|
|
get
|
|
{
|
|
DebuggerCheckVariableRead();
|
|
return System.Globalization.CultureInfo.CurrentCulture.Name;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// A variable that represents $PSUICulture
|
|
/// </summary>
|
|
internal class PSUICultureVariable : PSVariable
|
|
{
|
|
/// <summary>
|
|
/// Constructs an instance of the variable.
|
|
/// </summary>
|
|
internal PSUICultureVariable()
|
|
: base(SpecialVariables.PSUICulture, true, ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope,
|
|
RunspaceInit.DollarPSUICultureDescription)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the value of the variable.
|
|
/// </summary>
|
|
///
|
|
public override object Value
|
|
{
|
|
get
|
|
{
|
|
DebuggerCheckVariableRead();
|
|
return System.Globalization.CultureInfo.CurrentUICulture.Name;
|
|
}
|
|
}
|
|
}
|
|
}
|