public static SocialUser Create(string id, string displayName, EmailString email) { if (id == null) { throw new ArgumentNullException(nameof(id)); } if (displayName == null) { throw new ArgumentNullException(nameof(displayName)); } if (email == null) { throw new ArgumentNullException(nameof(email)); } return(new SocialUser { Id = id, DisplayName = displayName, Email = email }); }
public static LocalUser Create(string id, string passwordHash, string displayName, EmailString email) { if (id == null) { throw new ArgumentNullException(nameof(id)); } if (passwordHash == null) { throw new ArgumentNullException(passwordHash); } if (displayName == null) { throw new ArgumentNullException(nameof(displayName)); } if (email == null) { throw new ArgumentNullException(nameof(email)); } return(new LocalUser { Id = id, PasswordHash = passwordHash, DisplayName = displayName, Email = email }); }