Skip to content

Commit

Permalink
rename pot to vault
Browse files Browse the repository at this point in the history
  • Loading branch information
alec1o committed May 17, 2024
1 parent f4714b7 commit 757ecde
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions src/src/interfance/IPot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ public interface IPot
{
bool IsValid { get; }
byte[] Data { get; }
IPotAdd Add { get; }
IPotGet Get { get; }
IVaultAdd Add { get; }
IVaultGet Get { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Byter
{
public interface IPotAdd
public interface IVaultAdd
{
// 1 byte (3)
void Bool(bool value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Byter
{
public interface IPotGet
public interface IVaultGet
{
// 1 byte (3)
bool Bool();
Expand Down
14 changes: 7 additions & 7 deletions src/src/partials/Pot.cs → src/src/partials/Vault.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@

namespace Byter
{
public partial class Pot : IPot
public partial class Vault : IPot
{
private readonly List<byte> _bytes;
public bool IsValid { get; }
public byte[] Data => _bytes.ToArray();
public IPotAdd Add { get; }
public IPotGet Get { get; }
public IVaultAdd Add { get; }
public IVaultGet Get { get; }

public Pot() : this(null)
public Vault() : this(null)
{
}

public Pot(byte[] data)
public Vault(byte[] data)
{
Get = new PotGet(this);
Add = new PotAdd(this);
Get = new VaultGet(this);
Add = new VaultAdd(this);

IsValid = false;

Expand Down
10 changes: 5 additions & 5 deletions src/src/partials/PotAdd.cs → src/src/partials/VaultAdd.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

namespace Byter
{
public partial class Pot
public partial class Vault
{
private class PotAdd : IPotAdd
private class VaultAdd : IVaultAdd
{
private Pot _pot;
public PotAdd(Pot pot)
private Vault _vault;
public VaultAdd(Vault vault)
{
_pot = pot;
_vault = vault;
}

public void Bool(bool value)
Expand Down
10 changes: 5 additions & 5 deletions src/src/partials/PotGet.cs → src/src/partials/VaultGet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

namespace Byter
{
public partial class Pot
public partial class Vault
{
private class PotGet : IPotGet
private class VaultGet : IVaultGet
{
private Pot _pot;
public PotGet(Pot pot)
private Vault _vault;
public VaultGet(Vault vault)
{
_pot = pot;
_vault = vault;
}

public bool Bool()
Expand Down

0 comments on commit 757ecde

Please sign in to comment.