File size: 1,077 Bytes
8c763fb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

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 a PowerShell 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>
        public static PSObject Value { get; } = new PSObject();

        #endregion public_property
    }
}