예제 #1
0
파일: PermissionHelper.cs 프로젝트: ZR2/l
 internal static User ValidateUser(Server server, string userName) {
     if (string.IsNullOrWhiteSpace(userName))
         throw new ArgumentNullException(nameof(userName));
     var user = server.FindUsers(userName).FirstOrDefault();
     if (user == null)
         throw new NullReferenceException("That user does not exist.");
     return user;
 }