diff options
Diffstat (limited to 'src/test/burn/TestBA/Hresult.cs')
-rw-r--r-- | src/test/burn/TestBA/Hresult.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/burn/TestBA/Hresult.cs b/src/test/burn/TestBA/Hresult.cs new file mode 100644 index 00000000..bc1aa8c0 --- /dev/null +++ b/src/test/burn/TestBA/Hresult.cs | |||
@@ -0,0 +1,22 @@ | |||
1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
2 | |||
3 | namespace WixToolset.Test.BA | ||
4 | { | ||
5 | using System; | ||
6 | |||
7 | /// <summary> | ||
8 | /// Utility class to work with HRESULTs | ||
9 | /// </summary> | ||
10 | internal class Hresult | ||
11 | { | ||
12 | /// <summary> | ||
13 | /// Determines if an HRESULT was a success code or not. | ||
14 | /// </summary> | ||
15 | /// <param name="status">HRESULT to verify.</param> | ||
16 | /// <returns>True if the status is a success code.</returns> | ||
17 | public static bool Succeeded(int status) | ||
18 | { | ||
19 | return status >= 0; | ||
20 | } | ||
21 | } | ||
22 | } | ||