Inheritance: ReactiveUI.ReactiveObject
Esempio n. 1
0
        void OnOperatorCreated(IOperatorCreatedEvent operatorCreatedEvent)
        {
            var operatorModel = new RxSpyObservableModel(operatorCreatedEvent);

            observableRepository.TryAdd(operatorCreatedEvent.Id, operatorModel);
            TrackedObservables.Add(operatorModel);
        }
Esempio n. 2
0
 public RxSpySubscriptionModel(ISubscribeEvent subscribeEvent, RxSpyObservableModel child, RxSpyObservableModel parent)
 {
     SubscriptionId = subscribeEvent.EventId;
     Parent = parent;
     Child = child;
     IsActive = true;
     Created = TimeSpan.FromMilliseconds(subscribeEvent.EventTime);
 }
Esempio n. 3
0
 public RxSpySubscriptionModel(ISubscribeEvent subscribeEvent, RxSpyObservableModel child, RxSpyObservableModel parent)
 {
     SubscriptionId = subscribeEvent.EventId;
     Parent         = parent;
     Child          = child;
     IsActive       = true;
     Created        = TimeSpan.FromMilliseconds(subscribeEvent.EventTime);
 }
Esempio n. 4
0
        public ObservableGraphViewModel(RxSpyObservableModel model)
        {
            Graph = new ObservableGraph();

            var vertex = new ObservableVertex(model);
            Graph.AddVertex(vertex);

            AddAncestors(vertex);
            AddDescendants(vertex);
        }
Esempio n. 5
0
        public RxSpyObservableDetailsViewModel(RxSpyObservableModel model)
        {
            _model = model;

            this.WhenAnyValue(x => x._model.ObservedValues)
                .Select(x => x.CreateDerivedCollection(m => new RxSpyObservedValueViewModel(m)))
                .Scan((prev, cur) => { using (prev) return cur; })
                .ToProperty(this, x => x.ObservedValues, out _observedValues);

            this.WhenAnyValue(x => x._model.Parents, x => new RxSpyObservablesGridViewModel(x))
                .ToProperty(this, x => x.Parents, out _parents);

            this.WhenAnyValue(x => x._model.Children, x => new RxSpyObservablesGridViewModel(x))
                .ToProperty(this, x => x.Children, out _children);

            this.WhenAnyValue(x => x._model.HasError)
                .ToProperty(this, x => x.ShowErrorTab, out _showErrorTab);

            this.WhenAnyValue(x => x._model.Error, FormatErrorText)
                .ToProperty(this, x => x.ErrorText, out _errorText);
        }
        public RxSpyObservableGridItemViewModel(RxSpyObservableModel model)
        {
            Model = model;

            this.WhenAnyValue(x => x.Model.Id)
                .ToProperty(this, x => x.Id, out _id);

            this.WhenAnyValue(x => x.Model.Name)
                .ToProperty(this, x => x.Name, out _name);

            this.WhenAnyValue(x => x.Model.Tag)
                .ToProperty(this, x => x.Tag, out _tag);

            this.WhenAnyValue(x => x.Model.ValuesProduced)
                .ToProperty(this, x => x.ValuesProduced, out _valuesProduced);

            this.WhenAnyValue(x => x.Model.Children.Count)
                .ToProperty(this, x => x.TotalSubscriptions, out _totalSubscriptions);

            this.WhenAnyValue(x => x.Model.Parents.Count)
                .ToProperty(this, x => x.Parents, out _parents);

            this.WhenAnyValue(x => x.Model.Children.Count)
                .ToProperty(this, x => x.Children, out _children);

            this.WhenAnyValue(x => x.Model.Ancestors)
                .ToProperty(this, x => x.Ancestors, out _ancestors);

            this.WhenAnyValue(x => x.Model.Descendants)
                .ToProperty(this, x => x.Descendants, out _descendants);

            this.WhenAnyValue(x => x.Model.CallSite)
                .Select(x => Convert.ToString(x))
                .ToProperty(this, x => x.CallSite, out _callSite);

            this.WhenAnyValue(x => x.Model.Status)
                .ToProperty(this, x => x.Status, out _status);
        }
Esempio n. 7
0
        void OnOperatorCreated(IOperatorCreatedEvent operatorCreatedEvent)
        {
            var operatorModel = new RxSpyObservableModel(operatorCreatedEvent);

            observableRepository.TryAdd(operatorCreatedEvent.Id, operatorModel);
            TrackedObservables.Add(operatorModel);
        }