Overall; fixed design of IState.cs and IReadOnlyState.cs, and fixed namespaces in Beam.Abstractions to remove all references of Beam.Abstract.
This commit is contained in:
@@ -3,18 +3,21 @@
|
||||
namespace Beam.Models {
|
||||
public class State(string[] state) : IState {
|
||||
string[] state = state;
|
||||
|
||||
|
||||
public string[] GetState() => state;
|
||||
|
||||
public void SetState(string[] state) => this.state = state;
|
||||
|
||||
public IReadOnlyState AsReadOnly() => new ImmutableState(this.state);
|
||||
|
||||
public State Copy()
|
||||
=> new((string[])state.Clone());
|
||||
|
||||
IReadOnlyState IReadOnlyState.Copy()
|
||||
=> Copy();
|
||||
IState IState.Copy()
|
||||
=> Copy();
|
||||
|
||||
public static implicit operator ImmutableState(State state) => new ImmutableState(state.GetState());
|
||||
|
||||
public string this[Index i] {
|
||||
get => state[i];
|
||||
set => state[i] = value;
|
||||
|
||||
Reference in New Issue
Block a user