示例#1
0
 // Constructor
 public Account(string owner)
 {
     // New accounts are 'Silver' by default
       this._owner = owner;
       this._state = new SilverState(0.0, this);
 }
示例#2
0
 // Overloaded constructors
 public SilverState(State state)
     : this(state.Balance, state.Account)
 {
 }
示例#3
0
 // Overloaded constructors
 public GoldState(State state)
     : this(state.Balance, state.Account)
 {
 }
示例#4
0
 // Constructor
 public RedState(State state)
 {
     this.balance = state.Balance;
       this.account = state.Account;
       Initialize();
 }
示例#5
0
 public TraficSignal(State state)
 {
     _state = state;
 }