private void OnNewGroupUpdate(object sender, GroupUpdateEventAgrs args) { lock (this) { if (args.GroupUpdate.GroupId != -1) { var list = this.listenersByGroupId[args.GroupUpdate.GroupId]; list?.ForEach(l => l.OnNewGroupUpdate(args.GroupUpdate)); } } }