Example #1
0
        public IObservable <SceneModel> LoadSceneAsObservable(string sceneName, LoadSceneMode loadSceneMode)
        {
            var stream = RoutingRepository
                         .LoadSceneAsObservable(sceneName, loadSceneMode)
                         .SelectMany(x => RoutingTranslator.TranslateAsObservable(x))
                         .Share();

            // OnComplete を流してしまうと、Subject が閉じてしまうので OnNext, OnError のみを流す
            stream
            .Subscribe(
                (x) =>
            {
                if (x.Controller == default(IController))
                {
                    LoadSceneSubject.OnError(new NullReferenceException($"The component what implements `CAFU.Core.Presentation.View.IController` does not found in destination scene. Please check `{x.Name}` scenes to see if `Controller` component is attached."));
                }
                else
                {
                    LoadSceneSubject.OnNext(x);
                }
            },
                LoadSceneSubject.OnError
                );
            return(stream);
        }
Example #2
0
        public IObservable <SceneModel> UnloadSceneAsObservable(string sceneName)
        {
            var stream = RoutingRepository
                         .UnloadSceneAsObservable(sceneName)
                         .SelectMany(x => RoutingTranslator.TranslateAsObservable(x))
                         .Share();

            // OnComplete を流してしまうと、Subject が閉じてしまうので OnNext, OnError のみを流す
            stream
            .Subscribe(
                UnloadSceneSubject.OnNext,
                UnloadSceneSubject.OnError
                );
            return(stream);
        }
Example #3
0
 public RoutingService()
 {
     routingRepository = new RoutingRepository();
 }
Example #4
0
 public ICollection <StationMaterialsTask> GetStationMaterialTasks(IUnitOfWork uow, RouteStation station)
 {
     return(RoutingRepository.GetStationMaterialTasks(uow, station));
 }
Example #5
0
 public ICollection <RouteStation> GetAllRouteStations(IUnitOfWork session, Shopfloorline line)
 {
     return(RoutingRepository.GetAllRouteStations(session, line));
 }
Example #6
0
 public ICollection <RouteStation> GetAllRouteStations(IUnitOfWork session)
 {
     return(RoutingRepository.GetAllRouteStations(session));
 }
Example #7
0
 public ICollection <StationOutcome> GetAllStationOutcomes(
     IUnitOfWork session)
 {
     return(RoutingRepository.GetAllStationOutcomes(session));
 }
Example #8
0
 GetAllStationConfigurations(IUnitOfWork uow)
 {
     return(RoutingRepository.GetAllStationConfigurations(uow));
 }
Example #9
0
 public ICollection <ServiceTaskType> GetAllStepTypes(
     IUnitOfWork uow)
 {
     return(RoutingRepository.GetAllStepTypes(uow));
 }
Example #10
0
 public ICollection <ServiceRoute> GetAllServiceRoutes(
     IUnitOfWork uow)
 {
     return(RoutingRepository.GetAllServiceRoutes(uow));
 }
Example #11
0
 public ICollection <RouteStation> GetRouteStationsFromProcess(
     RouteStationProcess process)
 {
     return(RoutingRepository.GetRouteStationsFromProcess(process));
 }