PM.BLL/PMPollingService.cs
/// <summary>
/// Updates data in the PM with the results from the poll
/// </summary>
/// <param name="serialNumber">The serial number</param>
/// <param name="results">The poll results</param>
Updates data in the PM with the results from the poll
Updates data in the PM with the results from the poll
private static void UpdateData(string serialNumber, ICommandList? results)
        {
            if (!_data.ContainsKey(serialNumber))
            {
                _data.TryAdd(serialNumber, new PMData());
            }
            foreach(ICommand command in results ?? Enumerable.Empty<ICommand>())
            {
                command.UpdatePMData(_data[serialNumber]);
            }
        }
private static void UpdateData ( string serialNumber , ICommandList ? results ) { if ( ! _data . ContainsKey ( serialNumber ) ) { _data . TryAdd ( serialNumber , new PMData ( ) ) ; } foreach ( ICommand command in results ?? Enumerable . Empty < ICommand > ( ) ) { command . UpdatePMData ( _data [ serialNumber ] ) ; } }
Updates data in the PM with the results from the poll
Updates data in the PM with the results from the poll
serialNumber
string
The serial number
The serial number
results
ICommandList?
The poll results
The poll results