示例#1
0
 public void ReqStateChange(REnvState nextState)
 {
     if (_curStateEntity != null)
     {
         _curStateEntity.Dispose();
         _curStateEntity = null;
     }
     _curStateName   = nextState;
     _curStateEntity = _stateFactoryRE.CreateState(nextState);
     _curStateEntity.Start();
 }
示例#2
0
    public StateEntity CreateState(REnvState nextState)
    {
        switch (nextState)
        {
        case REnvState.CreateRegion:
            return(_createRegionFactory.Create());

        case REnvState.RegionUD:
            return(_regionUDFactory.Create());

        case REnvState.SegmentCUD:
            return(_segmentCUDFactory.Create());
        }
        throw Assert.CreateException("Code should not be reached here");
    }