You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewRussiaPaymentOrderException($"Data too long. Mandatory data must not exceed 300 bytes, but actually is {bytesMandatoryLen} bytes long. Remove additional data fields or shorten strings/values.");
thrownewRussiaPaymentOrderException($"Data too long. Payload must not exceed 300 bytes, but actually is {bytesOut.Length} bytes long. Remove additional data fields or shorten strings/values.");
generator.ToString().ShouldBe($"BEGIN:VEVENT{Environment.NewLine}SUMMARY:Release party{Environment.NewLine}DESCRIPTION:A small party for the new QRCoder. Bring some beer!{Environment.NewLine}LOCATION:Programmer's paradise, Beachtown, Paradise{Environment.NewLine}DTSTART:20160103T120000Z{Environment.NewLine}DTEND:20160103T143000Z{Environment.NewLine}END:VEVENT");
generator.ToString().ShouldBe($"BEGIN:VEVENT{Environment.NewLine}SUMMARY:Release party{Environment.NewLine}DESCRIPTION:A small party for the new QRCoder. Bring some beer!{Environment.NewLine}LOCATION:Programmer's paradise, Beachtown, Paradise{Environment.NewLine}DTSTART:20160103T090000Z{Environment.NewLine}DTEND:20160103T113000Z{Environment.NewLine}END:VEVENT");
879
+
}
880
+
881
+
846
882
[Fact]
847
883
[Category("PayloadGenerator/CalendarEvent")]
848
884
publicvoidcalendarevent_should_build_allday()
@@ -3280,24 +3316,44 @@ public void russiapayment_generator_should_throw_no_separator_exception()
varbankName="A very very very very very long bank name";
3323
+
// We use € symbol for the test case, because it needs 2-bytes. Otherwise we couldn't generate more than 300 bytes
3324
+
// of mandatory data to trigger the test case and stay at the same time within the 160 chars field validation limit
3325
+
varname="A very €€€€ €€€€ €€€€ €€€€ very very very very very very very very very very very very very very very very very very very very very very very very ver long name";
varname="A very very very very very very very very very very very very very very very very very very very very very very very very very very very very very long name";
Copy file name to clipboardExpand all lines: readme.md
+3-21Lines changed: 3 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,12 +35,12 @@ PM> Install-Package QRCoder
35
35
36
36
#### CI builds
37
37
The NuGet feed contains only **major/stable** releases. If you want the latest functions and features, you can use the CI builds [via Github packages](https://github.com/codebude/qrcoder/packages).
38
-
_(More information on how to use Github Packages in Nuget Package Manager can be [found here](http://webcache.googleusercontent.com/search?q=cache:i_gL6oIwpr8J:www.catiawidgets.net/2021/04/20/creating-github-packages-and-accessing-them-in-nuget/+&cd=1&hl=de&ct=clnk&gl=de).)_
38
+
_(More information on how to use Github Packages in Nuget Package Manager can be [found here](https://samlearnsazure.blog/2021/08/08/consuming-a-nuget-package-from-github-packages/).)_
39
39
40
40
41
41
## Usage
42
42
43
-
You only need four lines of code, to generate and view your first QR code.
43
+
You only need a couple lines of code, to generate your first QR code.
44
44
45
45
```csharp
46
46
QRCodeGeneratorqrGenerator=newQRCodeGenerator();
@@ -49,29 +49,11 @@ QRCode qrCode = new PngByteQRCode(qrCodeData);
49
49
byte[] qrCodeImage=qrCode.GetGraphic(20);
50
50
```
51
51
52
-
### Optional parameters and overloads
53
-
54
-
The GetGraphics-method has some more overloads. The first two enable you to set the color of the QR code graphic. One uses Color-class-types, the other HTML hex color notation.
There are a plenty of other options. So feel free to read more on that in our wiki: [Wiki: How to use QRCoder](https://github.com/codebude/QRCoder/wiki/How-to-use-QRCoder)
71
53
72
54
### Special rendering types
73
55
74
-
Besides the normal QRCode class (which is shown in the example above) for creating QR codes in Bitmap format, there are some more QR code rendering classes, each for another special purpose.
56
+
Besides the normal PngByteQRCode-class (which is shown in the example above) for creating QR codes in Bitmap format, there are some more QR code rendering classes, each for another special purpose.
0 commit comments