コード例 #1
0
        public EncryptionTypeDto Adapt(UserAccessOperationType accessOperation)
        {
            switch (accessOperation)
            {
            case UserAccessOperationType.Print:
                return(EncryptionTypeDto.NoEncryption);

            case UserAccessOperationType.PrintEncrypted:
                return(EncryptionTypeDto.ReverseEncryption);

            case UserAccessOperationType.NoPermission:
                throw new InvalidOperationException("User has no permission");

            default: throw new ArgumentOutOfRangeException(nameof(accessOperation), accessOperation, null);
            }
        }
コード例 #2
0
 public UserOperationModel(UserOperationType userOperationType, UserAccessOperationType userAccessOperationType)
 {
     this.UserOperationType       = userOperationType;
     this.UserAccessOperationType = userAccessOperationType;
 }