forked from PowerShell/PowerShell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBooleanBoxes.cs
More file actions
47 lines (41 loc) · 1.06 KB
/
Copy pathBooleanBoxes.cs
File metadata and controls
47 lines (41 loc) · 1.06 KB
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
44
45
46
47
// -----------------------------------------------------------------------
// <copyright file="BooleanBoxes.cs" company="Microsoft">
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
// -----------------------------------------------------------------------
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;
}
}
}
}