Exemplo n.º 1
0
        private void UpdateReachabilityChangedStats()
        {
            var now = DateTime.UtcNow;

            if (reachabilityChangedStats.ChangeCount == 0)
            {
                reachabilityChangedStats = new ReachabilityChangedStats(now, now, 1);
            }
            else
            {
                reachabilityChangedStats = new ReachabilityChangedStats(
                    reachabilityChangedStats.FirstChangeTimestamp,
                    now,
                    reachabilityChangedStats.ChangeCount + 1
                    );
            }
        }
Exemplo n.º 2
0
        private void ResetReachabilityChangedStats()
        {
            var now = DateTime.UtcNow;

            reachabilityChangedStats = new ReachabilityChangedStats(now, now, 0);
        }