From 94850fcc53c43d9ee1602fe3a9fe814503024604 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Sat, 14 Jan 2023 21:17:56 +1000 Subject: [PATCH] Delete Attempt{T}.cs --- src/ImageSharp/Common/Attempt{T}.cs | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 src/ImageSharp/Common/Attempt{T}.cs diff --git a/src/ImageSharp/Common/Attempt{T}.cs b/src/ImageSharp/Common/Attempt{T}.cs deleted file mode 100644 index a243dffd1f..0000000000 --- a/src/ImageSharp/Common/Attempt{T}.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Six Labors. -// Licensed under the Six Labors Split License. - -using System.Diagnostics.CodeAnalysis; - -namespace SixLabors.ImageSharp; - -/// -/// A wrapper for nullable values that correctly handles the return type based on the result. -/// -/// The type of nullable value. -public readonly struct Attempt -{ - /// - /// Gets a value indicating whether the attempted return was successful. - /// - [MemberNotNullWhen(returnValue: true, member: nameof(Value))] - public bool Success => this.Value is not null; - - /// - /// Gets the value when the attempted return is successful; otherwise, the default value for the type. - /// - public T? Value { get; init; } -}