#nullable enable
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
namespace Terminal.Gui.EnumExtensions;
/// Extension methods for the type.
[GeneratedCode ("Terminal.Gui.Analyzers.Internal", "1.0")]
[CompilerGenerated]
[DebuggerNonUserCode]
[ExcludeFromCodeCoverage (Justification = "Generated code is already tested.")]
[PublicAPI]
public static class AlignmentExtensions
{
///
/// Directly converts this value to an value with the same
/// binary representation.
///
/// NO VALIDATION IS PERFORMED!
[MethodImpl (MethodImplOptions.AggressiveInlining)]
public static int AsInt32 (this Alignment e) => Unsafe.As (ref e);
///
/// Directly converts this value to a value with the same
/// binary representation.
///
/// NO VALIDATION IS PERFORMED!
[MethodImpl (MethodImplOptions.AggressiveInlining)]
public static uint AsUInt32 (this Alignment e) => Unsafe.As (ref e);
///
/// Determines if the specified value is explicitly defined as a named value of the
/// type.
///
///
/// Only explicitly named values return true, as with IsDefined. Combined valid flag values of flags enums which are
/// not explicitly named will return false.
///
public static bool FastIsDefined (this Alignment _, int value)
{
return value switch
{
0 => true,
1 => true,
2 => true,
3 => true,
_ => false
};
}
}