From 0183b1ff9b9ae3411ea1237544028e336868e336 Mon Sep 17 00:00:00 2001 From: Alecio Furanze Date: Fri, 17 May 2024 16:59:06 +0200 Subject: [PATCH] add VaultPrefix on Vault --- src/src/partials/Vault.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/src/partials/Vault.cs b/src/src/partials/Vault.cs index 4fee936..ab3ec96 100644 --- a/src/src/partials/Vault.cs +++ b/src/src/partials/Vault.cs @@ -1,16 +1,21 @@ -using System; using System.Collections.Generic; namespace Byter { public partial class Vault : IVault { + private static readonly IVaultPrefix Prefix; private readonly List _bytes; public bool IsValid { get; } public byte[] Data => _bytes.ToArray(); public IVaultAdd Add { get; } public IVaultGet Get { get; } + static Vault() + { + Prefix = new VaultPrefix(); + } + public Vault() : this(null) { } @@ -19,9 +24,9 @@ public Vault(byte[] data) { Get = new VaultGet(this); Add = new VaultAdd(this); - + IsValid = false; - + _bytes = new List(); if (data != null && data.Length > 0)