mirror of
https://github.com/AssetRipper/NativeFileDialogs.NET.git
synced 2026-11-13 20:05:46 -10:00
21 lines
528 B
C#
21 lines
528 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 ResultExtensions
|
|
{
|
|
public static NfdStatus ToNfdStatus(this Result result)
|
|
{
|
|
return result switch
|
|
{
|
|
Result.Okay => NfdStatus.Ok,
|
|
Result.Cancel => NfdStatus.Cancelled,
|
|
_ => throw new NfdException(),
|
|
};
|
|
}
|
|
}
|