public void AssignSocialAccount(SocialAccount account) { // Guards if (account == null) { throw new Exception("SocialAccount can not be null!"); } // Business Rules ... if (_assignedSocialAccounts.Contains(account)) { throw new Exception("Account already assigned!"); } _assignedSocialAccounts.Add(account); }
public void ChangeAccountEmail(SocialAccount account, string email) => account.ChangeEmail(email);
public void ChangeAccountType(SocialAccount account, AccountType type) => account.ChangeAccountType(type);