Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions src/System.Management.Automation/engine/PSVersionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,22 @@
namespace System.Management.Automation
{
/// <summary>
/// <para>
/// Encapsulates $PSVersionTable.
/// </para>
/// <para>
/// Provides a simple interface to retrieve details from the PowerShell version table:
/// <code>
/// PSVersionInfo.PSVersion;
/// </code>
/// The above statement retrieves the PowerShell version.
/// <code>
/// PSVersionInfo.PSEdition;
/// </code>
/// The above statement retrieves the PowerShell edition.
/// </para>
/// </summary>
internal class PSVersionInfo
public class PSVersionInfo
{
internal const string PSVersionTableName = "PSVersionTable";
internal const string PSRemotingProtocolVersionName = "PSRemotingProtocolVersion";
Expand Down Expand Up @@ -151,7 +164,10 @@ private static Version GetWSManStackVersion()

#region Programmer APIs

internal static Version PSVersion
/// <summary>
/// Gets the version of PowerShell.
/// </summary>
public static Version PSVersion
{
get
{
Expand All @@ -175,7 +191,10 @@ internal static Version[] PSCompatibleVersions
}
}

internal static string PSEdition
/// <summary>
/// Gets the edition of PowerShell.
/// </summary>
public static string PSEdition
{
get
{
Expand Down