File size: 866 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
35
36
37
38
39
40
41
42
43
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

namespace Microsoft.Management.UI.Internal
{
    /// <summary>
    /// A class which returns the same boxed bool values.
    /// </summary>
    internal static class BooleanBoxes
    {
        private static object trueBox = true;
        private static object falseBox = false;

        internal static object TrueBox
        {
            get
            {
                return trueBox;
            }
        }

        internal static object FalseBox
        {
            get
            {
                return falseBox;
            }
        }

        internal static object Box(bool value)
        {
            if (value)
            {
                return TrueBox;
            }
            else
            {
                return FalseBox;
            }
        }
    }
}