1
0
mirror of https://github.com/chylex/Minecraft-Phantom-Panel.git synced 2024-10-17 12:42:51 +02:00
Minecraft-Phantom-Panel/Server/Phantom.Server.Database/Converters/RamAllocationUnitsConverter.cs

14 lines
466 B
C#

using System.Diagnostics.CodeAnalysis;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Phantom.Common.Data;
namespace Phantom.Server.Database.Converters;
[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")]
sealed class RamAllocationUnitsConverter : ValueConverter<RamAllocationUnits, ushort> {
public RamAllocationUnitsConverter() : base(
static units => units.RawValue,
static value => new RamAllocationUnits(value)
) {}
}