public static void RegisterUsernameValidator(this MembershipRebootConfiguration config, Func <IUserAccountService, UserAccount, string, ValidationResult> func) { if (config == null) { throw new ArgumentNullException("config"); } config.RegisterUsernameValidator(new DelegateValidator(func)); }