コード例 #1
0
            public ValueTask <Unit> Start()
            {
                return(Unit.InvokeAsync(() =>
                {
                    StartTime = DateTime.Now;
                    ForceUpdate();

                    _stepCounter.StartStepCountingUpdates(_queue, 1, Updater);
                }));
            }
コード例 #2
0
 public IObservable <int> WhenReadingTaken()
 => this.stepOb ??= Observable.Create <int>(ob =>
 {
     var scm = new CMStepCounter();
     scm.StartStepCountingUpdates(NSOperationQueue.CurrentQueue ?? new NSOperationQueue(), 1, (steps, timestamp, error) =>
                                  ob.OnNext((int)steps)
                                  );
     return(() =>
     {
         scm.StopStepCountingUpdates();
         scm.Dispose();
     });
 })
 .Publish()
 .RefCount();
コード例 #3
0
 public IObservable <int> WhenReadingTaken()
 {
     this.stepOb = this.stepOb ?? Observable.Create <int>(ob =>
     {
         var scm = new CMStepCounter();
         scm.StartStepCountingUpdates(NSOperationQueue.CurrentQueue, 10, (steps, timestamp, error) =>
         {
         });
         return(() =>
         {
             scm.StopStepCountingUpdates();
             scm.Dispose();
         });
     });
     return(this.stepOb);
 }
コード例 #4
0
ファイル: StepManager.cs プロジェクト: rodgerw42/WebAppDev
        public StepManager()
        {
            ForceUpdate();

            _stepCounter.StartStepCountingUpdates(_queue, 1, Updater);
        }