PM.BLL/PMPollingService.cs
/// <summary>
/// Gathers appropriate poll intervals based on intended frequency
/// </summary>
/// <param name="iteration">The current timer iteration</param>
/// <returns>The poll intervals to poll for</returns>
Gathers appropriate poll intervals based on intended frequency
Gathers appropriate poll intervals based on intended frequency
private static IEnumerable<PollInterval> CollectPollIntervals(ushort iteration)
        {
            IList<PollInterval> pollIntervals = new List<PollInterval>();
            if (iteration % 1 == 0)
            {
                pollIntervals.Add(PollInterval.Hz_100);
            }
            if (iteration % 10 == 0)
            {
                pollIntervals.Add(PollInterval.Hz_10);
            }
            if (iteration % 50 == 0)
            {
                pollIntervals.Add(PollInterval.Hz_2);
            }
            if (iteration % 100 == 0)
            {
                pollIntervals.Add(PollInterval.Hz_1);
            }
            return pollIntervals;
        }
private static IEnumerable < PollInterval > CollectPollIntervals ( ushort iteration ) { IList < PollInterval > pollIntervals = new List < PollInterval > ( ) ; if ( iteration % 1 == 0 ) { pollIntervals . Add ( PollInterval . Hz_100 ) ; } if ( iteration % 10 == 0 ) { pollIntervals . Add ( PollInterval . Hz_10 ) ; } if ( iteration % 50 == 0 ) { pollIntervals . Add ( PollInterval . Hz_2 ) ; } if ( iteration % 100 == 0 ) { pollIntervals . Add ( PollInterval . Hz_1 ) ; } return pollIntervals ; }
Gathers appropriate poll intervals based on intended frequency
Gathers appropriate poll intervals based on intended frequency
The poll intervals to poll for
The poll intervals to poll for
iteration
ushort
The current timer iteration
The current timer iteration