codebude / QRCoder

A pure C# Open Source QR Code implementation
MIT License
4.66k stars 1.1k forks source link

Implemented encoding constraints in SwissQRCode and GiroCode payloads #533

Closed codebude closed 6 months ago

codebude commented 6 months ago

Summary

If a payload type needs a specific eci mode/ecc level/version it should override the respecting parameters in the PayloadGenerator base class. Thus users don't have to set these values manually. Unfortunately some payload generators weren't updated after this feature (encoding parameters via payload) was added. This PR brings in the necessary changes/constraints.

This PR fixes/implements the following bugs/features:

Test plan

PR contains test cases.

Closing issues

Fixes #525

codebude commented 6 months ago

Updated wiki on usage: https://github.com/codebude/QRCoder/wiki/Advanced-usage---Payload-generators/_compare/dc841758a5891733d79f85858c133b19b76c7f53...942bb6e0c92bf0ff73f77dd9658e7cdd4583d492

Shane32 commented 6 months ago

Looks good. API approvals change because of the overridden members; just run API tests locally and it should update the API approval files.

codebude commented 6 months ago

Looks good. API approvals change because of the overridden members; just run API tests locally and it should update the API approval files.

Worked like a charm. :-)