private void AddNormalUser(UserAdministrator admin, IAssociation roleName) { if (roleName == null) { throw new Exception("Asocjacja nie moze byc null."); } AddPart(roleName, new NormalUser(admin)); }
public User(Association <User, NormalUser> roleNameNormalUser, Association <User, UserAdministrator> roleNameAdministrator) : base() { UserAdministrator admin = GetAdministrator(roleNameAdministrator); if (admin != null) { RemoveAdministrator(admin, roleNameAdministrator); } AddNormalUser(admin, roleNameNormalUser); }