private bool IsFiltered(MessageHandlerInfo info, MessageHandlerContext context) { if (context.Notification != null && info.NotificationNames != null && !info.NotificationNames.Contains(context.Notification.Notification)) { return(true); } if (context.Command != null && info.CommandNames != null && !info.CommandNames.Contains(context.Command.Command)) { return(true); } if (info.DeviсeGuids != null && !info.DeviсeGuids.Contains(context.Device.GUID, StringComparer.OrdinalIgnoreCase)) { return(true); } if (info.DeviсeClassIds != null && !info.DeviсeClassIds.Contains(context.Device.DeviceClassID)) { return(true); } if (info.NetworkIds != null && !info.NetworkIds.Contains(context.Device.NetworkID ?? 0)) { return(true); } return(false); }
private bool IsFiltered(MessageHandlerInfo info, MessageHandlerContext context) { if (context.Notification != null && info.NotificationNames != null && !info.NotificationNames.Contains(context.Notification.Notification)) return true; if (context.Command != null && info.CommandNames != null && !info.CommandNames.Contains(context.Command.Command)) return true; if (info.DeviсeGuids != null && !info.DeviсeGuids.Contains(context.Device.GUID, StringComparer.OrdinalIgnoreCase)) return true; if (info.DeviсeClassIds != null && !info.DeviсeClassIds.Contains(context.Device.DeviceClassID)) return true; if (info.NetworkIds != null && !info.NetworkIds.Contains(context.Device.NetworkID ?? 0)) return true; return false; }