コード例 #1
0
 internal static void ValidateUnicodeInfoOnUserNameAndPassword(string userName, SecureString password, Task.TaskErrorLoggingDelegate taskErrorLoggingDelegate)
 {
     SyncUtilities.ThrowIfArgumentNullOrEmpty("userName", userName);
     SyncUtilities.ThrowIfArgumentNull("password", password);
     SyncUtilities.ThrowIfArgumentNull("taskErrorLoggingDelegate", taskErrorLoggingDelegate);
     if (SyncUtilities.HasUnicodeCharacters(userName) || (password.Length > 0 && SyncUtilities.HasUnicodeCharacters(password)))
     {
         taskErrorLoggingDelegate(new InvalidOperationException(Strings.InvalidUnicodeCharacterUsage), ErrorCategory.InvalidArgument, null);
     }
 }