PM.BLL/PMPollingService.cs
/// <summary>
/// Creates a poll timer for the specified location
/// </summary>
/// <param name="serialNumber">The serialNumber</param>
/// <param name="pollIntervals">The intervals to poll for</param>
/// <returns>The created timer</returns>
Creates a poll timer for the specified location
Creates a poll timer for the specified location
private Timer CreatePollTimer(string serialNumber, IEnumerable<PollInterval> pollIntervals)
        {
            const ushort MillisecondsBetweenTrigger = 10;
            PollState state = new(serialNumber)
            {
                ExecutionStartTime = DateTime.UtcNow,
                PollIntervals = pollIntervals
            };
            return new Timer(HandlePollTimer, state, 0, MillisecondsBetweenTrigger);
        }
private Timer CreatePollTimer ( string serialNumber , IEnumerable < PollInterval > pollIntervals ) { const ushort MillisecondsBetweenTrigger = 10 ; PollState state = new ( serialNumber ) { ExecutionStartTime = DateTime . UtcNow , PollIntervals = pollIntervals } ; return new Timer ( HandlePollTimer , state , 0 , MillisecondsBetweenTrigger ) ; }
Creates a poll timer for the specified location
Creates a poll timer for the specified location
The created timer
The created timer
serialNumber
string
None
pollIntervals
IEnumerable<PollInterval>
The intervals to poll for
The intervals to poll for