Exemplo n.º 1
0
            public void ExecuteServicesOnEntry(bool isReentry, IDisplayables displayables)
            {
                Console.WriteLine(displayables.GetDisplayable <GameStatesDisplayables.ActiveDis>().message);

                _activeStateDisposables = new CompositeDisposable();

                _activeStateDisposables.Add(Observable.Create <string>(observer =>
                {
                    var timer      = new System.Timers.Timer();
                    timer.Interval = 1000;
                    timer.Elapsed += (se, ev) => observer.OnNext(ev.SignalTime + "!!!");
                    timer.Start();
                    return(timer);
                })
                                            //.Subscribe(Console.WriteLine));
                                            .Subscribe());
            }
Exemplo n.º 2
0
 public ListMustNotBeEmpty(IDisplayables errorDisplayables)
     : base(errorDisplayables.GetDisplayable <ErrorDisplayables.CommandValidationErrors>().emptyCommand)
 {
 }
Exemplo n.º 3
0
        private void InitializeMachine <T>(IState initialState, IState errorState, IStates states, ITriggers triggers, IDisplayables displayables) where T : IMachine
        {
            var transitionHandler = _runtime.Container.Resolve <TransitionHandler>(new TypedParameter(typeof(IDisplayables), displayables));

            var machine = _runtime.Container.Resolve <T>(new TypedParameter(typeof(TransitionHandler), transitionHandler));

            machine.Start(initialState, errorState);
            machine.Configure(states, triggers);

            _initializedMachines.Add(machine);
        }
Exemplo n.º 4
0
 public TransitionHandler(IDisplayables displayables)
 {
     _displayables = displayables;
 }
Exemplo n.º 5
0
 public void ExecuteServicesOnEntry(bool isReentry, IDisplayables displayables)
 {
     Console.WriteLine(displayables.GetDisplayableFromList <RoomsDisplayables.RoomsDis>(id).onEntryDescription);
 }
Exemplo n.º 6
0
 public ListMustContainOnlyOneItem(IDisplayables errorDisplayables)
     : base(errorDisplayables.GetDisplayable <ErrorDisplayables.CommandValidationErrors>().moreThanOneSentence)
 {
 }
Exemplo n.º 7
0
 public void ExecuteServicesOnEntry(bool isReentry, IDisplayables displayables)
 {
 }
Exemplo n.º 8
0
 public void ExecuteServicesOnEntry(bool isReentry, IDisplayables displayables)
 {
     Console.WriteLine(displayables.GetDisplayable <GameStatesDisplayables.InactiveDis>().message);
 }