mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 20:56:02 +00:00
I (Jason Shirk) ran https://github.com/dotnet/codeformatter with the default rules, basically: codeformatter /nocopyright "/c:DEBUG,UNIX,CORECLR" @files.rsp This caused a few problems building, which were fixed up manually. Notable changes: `this.` is removed unless needed to disambiguate. private instance fields are renamed to have a `_` prefix. private static fields are renamed to have a `s_` prefix. I left some projects alone (like PackageManagement) and also left some generated code alone.
52 lines
1.3 KiB
C#
52 lines
1.3 KiB
C#
/********************************************************************++
|
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
--********************************************************************/
|
|
|
|
using System;
|
|
|
|
namespace System.Management.Automation.Language
|
|
{
|
|
/// <summary>
|
|
/// This type is introduced to provide a way to pass null into a .NET method that has a string parameter
|
|
/// </summary>
|
|
public class NullString
|
|
{
|
|
#region private_members
|
|
|
|
// Private member for instance.
|
|
private static readonly NullString s_value = new NullString();
|
|
|
|
#endregion private_members
|
|
|
|
#region public_property
|
|
|
|
/// <summary>
|
|
/// This overrides ToString() method and returns null.
|
|
/// </summary>
|
|
public override string ToString()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>
|
|
/// This returns the singleton instance of NullString
|
|
/// </summary>
|
|
public static NullString Value
|
|
{
|
|
get { return s_value; }
|
|
}
|
|
|
|
#endregion public_property
|
|
|
|
#region private Constructor
|
|
|
|
/// <summary>
|
|
/// This is a private constructor, meaning no outsiders have access.
|
|
/// </summary>
|
|
private NullString()
|
|
{
|
|
}
|
|
|
|
#endregion private Constructor
|
|
}
|
|
} |