public Grant() { NoRequest = new NoRequestState(this); Created = new CreatedState(this); UnderConsideration = new UnderConsiderationState(this); Confirmed = new ConfirmedState(this); Rejected = new RejectedState(this); Withdrawn = new WithdrawnState(this); _currentState = NoRequest; }
private AbstractState CreateAbstractState(Shipping m_Parent) { AbstractState _ret = null; switch (m_Parent.ShippingState2.GetValueOrDefault(GetDefaultValue(m_Parent))) { case ShippingState2.Cancelation: _ret = new CancelationState(this); break; case ShippingState2.Canceled: _ret = new CanceledState(this); break; case ShippingState2.Completed: _ret = new CompletedState(this); break; case ShippingState2.Confirmed: _ret = new ConfirmedState(this); break; case ShippingState2.Creation: _ret = new CreationState(this); break; case ShippingState2.Delayed: _ret = new DelayedState(this); break; case ShippingState2.LackOfData: _ret = new LackOfDataState(this); break; case ShippingState2.Left: _ret = new LeftState(this); break; case ShippingState2.Started: _ret = new StartedState(this); break; case ShippingState2.Waiting: _ret = new WaitingState(this); break; } return(_ret); }