예제 #1
0
        void HandleDetectorStatusMessage(List <string> msg)
        {
            var message = new DetectorStatusMessage();

            for (int i = 1; i < msg.Count; i++)
            {
                var rawDetection = msg[i].Split(',');

                message.DetectorStates.Add(
                    new DetectorStatus
                {
                    HostName = rawDetection[0],
                    Channel  = Convert.ToInt16(rawDetection[1]),
                    Online   = Convert.ToInt16(rawDetection[2]) == 1
                });
            }
            DetectorStatusReceived(this, new SonitorEventArgs(message));
        }
예제 #2
0
        void HandleDetectorStatusMessage( List<string> msg )
        {
            var message = new DetectorStatusMessage();
            for ( int i = 1; i < msg.Count; i++ )
            {
                var rawDetection = msg[ i ].Split( ',' );

                message.DetectorStates.Add(
                    new DetectorStatus
                    {
                        HostName = rawDetection[ 0 ],
                        Channel = Convert.ToInt16( rawDetection[ 1 ] ),
                        Online = Convert.ToInt16( rawDetection[ 2 ] ) == 1
                    } );
            }
            DetectorStatusReceived( this, new SonitorEventArgs( message ) );
        }