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); } }
public UserOperationModel(UserOperationType userOperationType, UserAccessOperationType userAccessOperationType) { this.UserOperationType = userOperationType; this.UserAccessOperationType = userAccessOperationType; }