private void Cpu_Connected(object sender, PviEventArgs e) { String ipAddress = String.Empty; Cpu cpu = sender as Cpu; if (sender != null) { ipAddress = cpu.Connection.TcpIp.DestinationIpAddress; } var pviEventMsg = Utils.FormatPviEventMessage($"ServiceWrapper.Cpu_Connected. IpAddress={ipAddress}", e); _eventNotifier.OnCpuConnected(sender, new CpuConnectionArgs(cpu, pviEventMsg)); }