Пример #1
0
		private void SlowDown(BindingList<DebugLine> bindedList, Action<BindingList<DebugLine>> action)
		{
			var uiSynchronyzer = new UISynchronyzer<IList<IEvent<ListChangedEventArgs>>>();
			Observable.FromEvent<ListChangedEventArgs>(bindedList, "ListChanged").BufferWithTime(TimeSpan.FromSeconds(1)).
				Subscribe(uiSynchronyzer);
			uiSynchronyzer.Subscribe(ev => action(bindedList));
		}
Пример #2
0
		private GridModelObserver Model()
		{
			var uiSynchronyzer = new UISynchronyzer<IList<OutputDebugString>>();
			var model = new GridModelObserver();
			uiSynchronyzer.Subscribe(model);

			debugStringSource.BufferWithTime(TimeSpan.FromSeconds(10)).Subscribe(uiSynchronyzer);

			SlowDown(model.DebugLines, ScrollIntoView);
			return model;
		}