public void UpdateUserStatus(UserStatus newUserStatus) { if (!friends.ContainsKey(newUserStatus.userId)) { friends.Add(newUserStatus.userId, newUserStatus); } else { friends[newUserStatus.userId] = newUserStatus; } OnUpdateUserStatus?.Invoke(newUserStatus.userId, newUserStatus); }
public void RaiseUpdateUserStatus(string id, FriendsController.UserStatus userStatus) { OnUpdateUserStatus?.Invoke(id, userStatus); }