/
githubmirror
/
Files
Обзор
Документация
Войти
/
githubmirror
/
Files
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v4.0.21
src/Files.App.CsWin32/HRESULT.cs
25 строк
706 B
0x5BFA
Code Quality: Introduced the new WindowsStorable (#17002)
22 апр 2025, 17:00
Не верифицирован
22 апр 2025, 17:00
d983bd1
Код
Авторство
О чём код?
// Copyright (c) Files Community // Licensed under the MIT License. using System.Diagnostics; using System.Runtime.InteropServices; namespace Windows.Win32.Foundation { [DebuggerDisplay("{" + nameof(Value) + ",h}")] public readonly partial struct HRESULT { /// <summary> /// Throws an exception if the <see cref="HRESULT"/> indicates a failure in debug mode. Otherwise, it returns the original <see cref="HRESULT"/>. /// </summary> /// <returns>Returns the original <see cref="HRESULT"/> value regardless of the operation's success.</returns> public readonly HRESULT ThrowIfFailedOnDebug() { #if DEBUG if (Failed) Marshal.ThrowExceptionForHR(Value); #endif return this; } } }