mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-15 14:20:03 +00:00
Based on standard practices, we need to have a copyright and license notice at the top of each source file. Removed existing copyrights and updated/added copyright notices for .h, .cpp, .cs, .ps1, and .psm1 files. Updated module manifests for consistency to have Author = "PowerShell" and Company = "Microsoft Corporation". Removed multiple line breaks. Separate PR coming to update contribution document for new source files: #6140 Manually reviewed each change. Fix #6073
45 lines
1.1 KiB
C#
45 lines
1.1 KiB
C#
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// Licensed under the MIT License.
|
|
|
|
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.
|
|
|
|
#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; } = new NullString();
|
|
|
|
#endregion public_property
|
|
|
|
#region private Constructor
|
|
|
|
/// <summary>
|
|
/// This is a private constructor, meaning no outsiders have access.
|
|
/// </summary>
|
|
private NullString()
|
|
{
|
|
}
|
|
|
|
#endregion private Constructor
|
|
}
|
|
} |