mirror of
https://github.com/chylex/Minecraft-Phantom-Panel.git
synced 2026-01-12 17:58:15 +01:00
13 lines
458 B
C#
13 lines
458 B
C#
using System.Collections.Immutable;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Phantom.Utils.Rpc;
|
|
|
|
namespace Phantom.Controller.Database.Converters;
|
|
|
|
[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global")]
|
|
sealed class AuthSecretConverter() : ValueConverter<AuthSecret, byte[]>(
|
|
static units => units.Bytes.ToArray(),
|
|
static value => new AuthSecret(ImmutableArray.Create(value))
|
|
);
|