private static bool IsMatchedByStatus(CiphertextStatus ciphertextStatus, bool isDeleted)
 {
     switch (ciphertextStatus)
     {
         case CiphertextStatus.Any:
             return true;
         case CiphertextStatus.Active:
             return !isDeleted;
         case CiphertextStatus.Deleted:
             return isDeleted;
         default:
             throw new NotSupportedException("The account status filter specified is not supported: " + ciphertextStatus);
     }
 }
Exemple #2
0
        private static bool IsMatchedByStatus(CiphertextStatus ciphertextStatus, bool isDeleted)
        {
            switch (ciphertextStatus)
            {
            case CiphertextStatus.Any:
                return(true);

            case CiphertextStatus.Active:
                return(!isDeleted);

            case CiphertextStatus.Deleted:
                return(isDeleted);

            default:
                throw new NotSupportedException("The account status filter specified is not supported: " + ciphertextStatus);
            }
        }
 public CiphertextDto[] GetAll(CiphertextStatus ciphertextStatus = CiphertextStatus.Active)
 {
     return GetAllIds().Select(Get).Where(ciphertextDto =>
         IsMatchedByStatus(ciphertextStatus, ciphertextDto.Deleted)).ToArray();
 }
Exemple #4
0
 public CiphertextDto[] GetAll(CiphertextStatus ciphertextStatus = CiphertextStatus.Active)
 {
     return(GetAllIds().Select(Get).Where(ciphertextDto =>
                                          IsMatchedByStatus(ciphertextStatus, ciphertextDto.Deleted)).ToArray());
 }