mirror of
https://github.com/AssetRipper/NativeFileDialogs.NET.git
synced 2026-11-13 18:07:38 -10:00
21 lines
552 B
C#
21 lines
552 B
C#
// Copyright (c) Speykious
|
|
// This file is part of NativeFileDialogs.NET.
|
|
// NativeFileDialogs.NET is licensed under the Zlib License. See LICENSE for details.
|
|
|
|
using NativeFileDialogs.AutoGen;
|
|
|
|
namespace NativeFileDialogs.Net;
|
|
|
|
internal static class NfdresultTExtensions
|
|
{
|
|
public static NfdStatus ToNfdStatus(this NfdresultT result)
|
|
{
|
|
return result switch
|
|
{
|
|
NfdresultT.NFD_OKAY => NfdStatus.Ok,
|
|
NfdresultT.NFD_CANCEL => NfdStatus.Cancelled,
|
|
_ => throw new NfdException(),
|
|
};
|
|
}
|
|
}
|