Ejemplo n.º 1
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Returns HashCode</returns>
 public override int GetHashCode()
 {
     return(String.Format("{0}|{1}|{2}|{3}|{4}|{5}|{6}|{7}|",
                          PasswordProfile.GetHashCode(),
                          AccountEnabled.GetHashCode(),
                          DisplayName?.GetHashCode() ?? 0,
                          MailNickname?.GetHashCode() ?? 0,
                          PasswordPolicies?.GetHashCode() ?? 0,
                          UserPrincipalName?.GetHashCode() ?? 0,
                          ProfilePhoto?.GetHashCode() ?? 0,
                          Licenses.Aggregate(0, (acc, next) => acc += (next != null ? next.GetHashCode() : 0))
                          ).GetHashCode());
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Disables the user.
 /// </summary>
 public void DisableTheUser()
 {
     try
     {
         if (AccountEnabled.GetAttribute("checked").Contains("false"))
         {
             return;
         }
         EditButton.Click();
         UserEnabled.Click();
         SaveUserButton.Click();
         BackToListButton.Click();
     }
     catch (Exception)
     {
         EditButton.Click();
         UserEnabled.Click();
         SaveUserButton.Click();
         BackToListButton.Click();
     }
 }