public IMonitoredCall StartMonitoringCall(IInstrumentedCall call) { var monitoredCallOpt = mMonitoredCalls.Lookup(call.InstrumentedCallId); if (!monitoredCallOpt.HasValue) { var monitoredCall = new MonitoredCall(call); mMonitoredCalls.AddOrUpdate(monitoredCall); return(monitoredCall); } return(monitoredCallOpt.Value); }
public MarbleObservableItemGroup(IImmutableList <long> ordering, IInstrumentedCall call, ReadOnlyObservableCollection <MarbleObservableItem> items, IConcurrencyService concurrencyService) { Ordering = ordering; mCall = call; Items = items; StreamEventsViewModel = new StreamEventsViewModel(concurrencyService); StreamEventsViewModel.StreamEventsSource = Items.ToObservableChangeSet() .ObserveOn(concurrencyService.TaskPoolRxScheduler) .AddKey(x => x.ObservableInstance.ObservableId) .WhereReasonsAre(ChangeReason.Add) .Flatten() .Select(chg => chg.Current) .Select(item => item.ObservableInstance) .SelectMany(obs => obs.Subscriptions) .SelectMany(sub => sub.Events); }
public MonitoredCall(IInstrumentedCall call) { Call = call; }
public void StopMonitoringCall(IInstrumentedCall call) { mMonitoredCalls.RemoveKey(call.InstrumentedCallId); }