public SaleBetStateMachine(IProcessingService processingService)
        {
            ProcessingService   = processingService;
            ReceiptProvider     = processingService?.BetReceiptProvider;
            JsonStateSerializer = new JsonStateSerializer <SaleBetStateMachine, SaleBetSaga>(this);

            BuildStateMachine();
        }
Esempio n. 2
0
        public BetEditorViewModel(IDataService dataService, IAccountIdentService accountIdentService, IBetReceiptProvider receiptService, IProcessingService processingService, IUserMessageService userMessageService)
        {
            DataService         = dataService;
            AccountIdentService = accountIdentService;
            ReceiptService      = receiptService;
            ProcessingService   = processingService;
            UserMessageService  = userMessageService;

            Items    = new ObservableCollection <object>();
            Events   = new EventsViewModel(dataService, SelectedEventAction);
            Draws    = new SuperexpressDrawsViewModel(dataService, SelectedDrawAction);
            MadeBets = new MadeBetsViewModel(DataService, SelectedMadeBet);

            RemoveBetCommand             = new DelegateCommand <object>(RemoveBet);
            SwitchToExpressCommand       = new DelegateCommand <BaseBetViewModel>(SwitchToExpress);
            SwitchToSystemCommand        = new DelegateCommand <BaseBetViewModel>(SwitchToSystem, x => false);
            CreateExpressBetCommand      = new DelegateCommand(CreateNewExpressBet);
            CreateSuperexpressBetCommand = new DelegateCommand(CreateNewSuperexpressBet);

            this.OfInpc(x => x.PropertyChanged += SelfPropertyChanged);
        }