Beispiel #1
0
 public ObservableInputVM(ObservableInput input)
     : this()
 {
     _input = input;
     Name = input.Name;
     _disposable = _input.ObservableStr.Materialize().ObserveOnDispatcher().Subscribe(_history.Add);
 }
Beispiel #2
0
        public ObservableInputVM()
        {
            OnNext = new DelegateCommand<object>(OnNextHandler, (o) => _input.IsActive);
            OnError = new DelegateCommand<object>(OnErrorHandler, (o) => _input.IsActive);
            OnCompleted = new DelegateCommand<object>(OnCompletedHandler, (o) => _input.IsActive);

            if (IsInDesignMode())
            {
                Name = "a";
                _input = new ObservableInput<string>();
            }
        }
Beispiel #3
0
 internal static void OnError2(this ObservableInput input)
 {
     input.OnError(new Exception());
     Thread.Sleep(100);
 }
Beispiel #4
0
 internal static void OnCompleted2(this ObservableInput input)
 {
     input.OnCompleted();
     Thread.Sleep(100);
 }
Beispiel #5
0
 internal static void OnNext2(this ObservableInput input, string value)
 {
     input.OnNext(value);
     Thread.Sleep(100);
 }