Ejemplo n.º 1
0
 public CommandViewModel(IYubaba yubaba, IEventAggregator eventAggregator)
 {
     Yubaba          = yubaba ?? throw new ArgumentNullException(nameof(yubaba));
     EventAggregator = eventAggregator ?? throw new ArgumentNullException(nameof(eventAggregator));
     InitCommand     = new AsyncReactiveCommand()
                       .WithSubscribe(async() =>
     {
         await Yubaba.RequestIntroductionAsync();
         EventAggregator.GetEvent <ResetEvent>().Publish();
     })
                       .AddTo(Disposables);
 }
Ejemplo n.º 2
0
        public ContractViewModel(IYubaba yubaba, IEventAggregator eventAggregator)
        {
            Yubaba          = yubaba ?? throw new ArgumentNullException(nameof(yubaba));
            EventAggregator = eventAggregator ?? throw new ArgumentNullException(nameof(eventAggregator));
            SubmitCommand   = new AsyncReactiveCommand()
                              .WithSubscribe(async() => await Yubaba.SubmitContractAsync(new ContractPaper(SignatureSign.Value)))
                              .AddTo(Disposables);

            EventAggregator.GetEvent <ResetEvent>()
            .Subscribe(() => SignatureSign.Value = "")
            .AddTo(Disposables);
        }
Ejemplo n.º 3
0
 public MessagesViewModel(IYubaba yubaba)
 {
     Yubaba = yubaba ?? throw new ArgumentNullException(nameof(yubaba));
 }