2016-03-30 14:20:52 -07:00
|
|
|
/********************************************************************++
|
|
|
|
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
|
--********************************************************************/
|
2016-07-29 13:02:49 -07:00
|
|
|
|
2016-03-30 14:20:52 -07:00
|
|
|
namespace System.Management.Automation.Internal
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// This is a singleton object that is used to indicate a void return result.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>
|
|
|
|
|
/// It's a singleton class. Sealed to prevent subclassing. Any operation that
|
|
|
|
|
/// returns no actual value should return this object AutomationNull.Value.
|
|
|
|
|
/// Anything that evaluates an MSH expression should be prepared to deal
|
|
|
|
|
/// with receiving this result and discarding it. When received in an
|
|
|
|
|
/// evaluation where a value is required, it should be replaced with null.
|
|
|
|
|
/// </remarks>
|
|
|
|
|
public static class AutomationNull
|
|
|
|
|
{
|
|
|
|
|
#region private_members
|
|
|
|
|
|
|
|
|
|
// Private member for Value.
|
|
|
|
|
|
|
|
|
|
#endregion private_members
|
|
|
|
|
|
|
|
|
|
#region public_property
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Returns the singleton instance of this object.
|
|
|
|
|
/// </summary>
|
2016-08-02 13:29:09 -07:00
|
|
|
public static PSObject Value { get; } = new PSObject();
|
2016-03-30 14:20:52 -07:00
|
|
|
|
|
|
|
|
#endregion public_property
|
|
|
|
|
}
|
|
|
|
|
} // namespace System.Management.Automation
|
|
|
|
|
|