Is it possible to come up with a more convoluted HelloWorld example?
-
Tuesday, August 21, 2012 7:04 PM
Seriously? Here is just part of the HelloWorld example....
private static IObservable<SensorReading> SimulateLiveData() { return ToObservableInterval(HistoricData, TimeSpan.FromMilliseconds(1000), Scheduler.ThreadPool); } private static IObservable<T> ToObservableInterval<T>(IEnumerable<T> source, TimeSpan period, IScheduler scheduler) { return Observable.Using( () => source.GetEnumerator(), it => Observable.Generate( default(object), _ => it.MoveNext(), _ => _, _ => { Console.WriteLine("Input {0}", it.Current); return it.Current; }, _ => period, scheduler)); } static IQStreamable<SensorReading> CreateStream(Application application, bool isRealTime) { DateTime startTime = new DateTime(2011, 1, 1); if (isRealTime) { // Live data uses IQbservable<> return application.DefineObservable(() => SimulateLiveData()).ToPointStreamable( r => PointEvent<SensorReading>.CreateInsert(startTime.AddSeconds(r.Time), r), AdvanceTimeSettings.StrictlyIncreasingStartTime); } // Historic data uses IQueryable<> return application.DefineEnumerable(() => HistoricData).ToPointStreamable( r => PointEvent<SensorReading>.CreateInsert(startTime.AddSeconds(r.Time), r), AdvanceTimeSettings.StrictlyIncreasingStartTime); } }....this is laughable. Document what the code is doing for Pete's sake.....
All Replies
-
Tuesday, August 28, 2012 1:39 AManyone can help?
-
Tuesday, August 28, 2012 1:16 PM
There wasn't a question. It seemed like a complaint about the product group samples. Is there something specific that you need help with?DevBiker (aka J Sawyer)
Microsoft MVP - Sql Server (StreamInsight)
If I answered your question, please mark as answer.
If my post was helpful, please mark as helpful.- Marked As Answer by Roman SchindlauerMicrosoft Employee Tuesday, October 02, 2012 5:10 AM


