示例#1
0
        public MessagesPageViewModel(
            ApiClient apiClient,
            CurrentUserManager currentUserManager,
            IAsymetricEncryptionService asymetricEncryptionService,
            ISymetricEnryptionService symetricEnryptionService,
            IKeyStore keyStore)
        {
            this.apiClient                  = apiClient;
            this.currentUserManager         = currentUserManager;
            this.asymetricEncryptionService = asymetricEncryptionService;
            this.symetricEnryptionService   = symetricEnryptionService;
            this.keyStore      = keyStore;
            SendMessageCommand = ReactiveCommand.CreateFromTask(SendMessage);

            Load();
        }
        public MainWindowViewModel(CurrentUserManager currentUserManager)
        {
            this.currentUserManager = currentUserManager;

            LogoutCommand = ReactiveCommand.CreateFromTask(currentUserManager.Logout);
        }