From 383667452c415afb671b0e7ba9c801a8fff11a4c Mon Sep 17 00:00:00 2001 From: manuelbl Date: Sun, 13 Jan 2019 23:37:56 +0100 Subject: [PATCH] Rename namespace --- dotnet/QrCodeGenerator/BitArrayExtensions.cs | 2 +- .../QrCodeGenerator/DataTooLongException.cs | 2 +- dotnet/QrCodeGenerator/Objects.cs | 2 +- dotnet/QrCodeGenerator/QrCode.cs | 2 +- dotnet/QrCodeGenerator/QrCodeGenerator.csproj | 4 +- dotnet/QrCodeGenerator/QrSegment.cs | 2 +- dotnet/QrCodeGenerator/QrSegmentAdvanced.cs | 4 +- .../QrCodeGenerator/ReedSolomonGenerator.cs | 2 +- dotnet/QrCodeGenerator/docfx/api/index.md | 95 +++++++++++++++++++ dotnet/QrCodeGenerator/docfx/docfx.json | 58 +++++++++++ dotnet/QrCodeGenerator/docfx/index.md | 5 + dotnet/QrCodeGeneratorDemo/Program.cs | 2 +- .../QrCodeGeneratorDemo.csproj | 4 +- .../BitArrayExtensionsTest.cs | 2 +- dotnet/QrCodeGeneratorTest/KanjiTest.cs | 2 +- .../QrCodeGeneratorTest/OptimalSegmentTest.cs | 3 +- dotnet/QrCodeGeneratorTest/PngTest.cs | 4 +- .../QrCodeGeneratorTest.csproj | 4 +- dotnet/QrCodeGeneratorTest/QrCodeTest.cs | 4 +- .../QrSegmentEncodingTest.cs | 2 +- .../QrCodeGeneratorTest/QrSegmentRegexTest.cs | 2 +- dotnet/QrCodeGeneratorTest/SvgTest.cs | 4 +- dotnet/QrCodeGeneratorTest/TestHelper.cs | 2 +- 23 files changed, 185 insertions(+), 28 deletions(-) create mode 100644 dotnet/QrCodeGenerator/docfx/api/index.md create mode 100644 dotnet/QrCodeGenerator/docfx/docfx.json create mode 100644 dotnet/QrCodeGenerator/docfx/index.md diff --git a/dotnet/QrCodeGenerator/BitArrayExtensions.cs b/dotnet/QrCodeGenerator/BitArrayExtensions.cs index 460534e..290ba3d 100644 --- a/dotnet/QrCodeGenerator/BitArrayExtensions.cs +++ b/dotnet/QrCodeGenerator/BitArrayExtensions.cs @@ -24,7 +24,7 @@ using System; using System.Collections; -namespace Io.Nayuki.QrCodeGen +namespace IO.Nayuki.QrCodeGen { /// /// Provides extension methods for the class. diff --git a/dotnet/QrCodeGenerator/DataTooLongException.cs b/dotnet/QrCodeGenerator/DataTooLongException.cs index 94919a1..25c8841 100644 --- a/dotnet/QrCodeGenerator/DataTooLongException.cs +++ b/dotnet/QrCodeGenerator/DataTooLongException.cs @@ -23,7 +23,7 @@ using System; using System.Collections.Generic; -namespace Io.Nayuki.QrCodeGen +namespace IO.Nayuki.QrCodeGen { /// /// Thrown when the supplied data does not fit any QR Code version. diff --git a/dotnet/QrCodeGenerator/Objects.cs b/dotnet/QrCodeGenerator/Objects.cs index 8a928b8..cea4296 100644 --- a/dotnet/QrCodeGenerator/Objects.cs +++ b/dotnet/QrCodeGenerator/Objects.cs @@ -23,7 +23,7 @@ using System; -namespace Io.Nayuki.QrCodeGen +namespace IO.Nayuki.QrCodeGen { internal class Objects { diff --git a/dotnet/QrCodeGenerator/QrCode.cs b/dotnet/QrCodeGenerator/QrCode.cs index a42dce3..41251f1 100644 --- a/dotnet/QrCodeGenerator/QrCode.cs +++ b/dotnet/QrCodeGenerator/QrCode.cs @@ -30,7 +30,7 @@ using System.Drawing; using System.Drawing.Imaging; using System.Text; -namespace Io.Nayuki.QrCodeGen +namespace IO.Nayuki.QrCodeGen { /// /// A QR Code symbol, which is a type of two-dimension barcode. diff --git a/dotnet/QrCodeGenerator/QrCodeGenerator.csproj b/dotnet/QrCodeGenerator/QrCodeGenerator.csproj index ad02b4c..5f56a34 100644 --- a/dotnet/QrCodeGenerator/QrCodeGenerator.csproj +++ b/dotnet/QrCodeGenerator/QrCodeGenerator.csproj @@ -2,8 +2,8 @@ netstandard2.0 - Io.Nayuki.QrCodeGen - Io.Nayuki.QrCodeGen + IO.Nayuki.QrCodeGen + IO.Nayuki.QrCodeGen 1.4.1 Project Nayuki QR Code Generator for .NET diff --git a/dotnet/QrCodeGenerator/QrSegment.cs b/dotnet/QrCodeGenerator/QrSegment.cs index 108a136..fa9318f 100644 --- a/dotnet/QrCodeGenerator/QrSegment.cs +++ b/dotnet/QrCodeGenerator/QrSegment.cs @@ -28,7 +28,7 @@ using System.Diagnostics; using System.Text; using System.Text.RegularExpressions; -namespace Io.Nayuki.QrCodeGen +namespace IO.Nayuki.QrCodeGen { /// /// A segment of character/binary/control data in a QR Code symbol. diff --git a/dotnet/QrCodeGenerator/QrSegmentAdvanced.cs b/dotnet/QrCodeGenerator/QrSegmentAdvanced.cs index 4d6cf28..1f6f188 100644 --- a/dotnet/QrCodeGenerator/QrSegmentAdvanced.cs +++ b/dotnet/QrCodeGenerator/QrSegmentAdvanced.cs @@ -27,9 +27,9 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Text; -using static Io.Nayuki.QrCodeGen.QrSegment; +using static IO.Nayuki.QrCodeGen.QrSegment; -namespace Io.Nayuki.QrCodeGen +namespace IO.Nayuki.QrCodeGen { /// /// Splits text into optimal segments and encodes kanji segments. diff --git a/dotnet/QrCodeGenerator/ReedSolomonGenerator.cs b/dotnet/QrCodeGenerator/ReedSolomonGenerator.cs index 366f506..4c33dad 100644 --- a/dotnet/QrCodeGenerator/ReedSolomonGenerator.cs +++ b/dotnet/QrCodeGenerator/ReedSolomonGenerator.cs @@ -25,7 +25,7 @@ using System; using System.Diagnostics; -namespace Io.Nayuki.QrCodeGen +namespace IO.Nayuki.QrCodeGen { /// /// Computes the Reed-Solomon error correction codewords for a sequence of data codewords at a given degree. diff --git a/dotnet/QrCodeGenerator/docfx/api/index.md b/dotnet/QrCodeGenerator/docfx/api/index.md new file mode 100644 index 0000000..8e23e78 --- /dev/null +++ b/dotnet/QrCodeGenerator/docfx/api/index.md @@ -0,0 +1,95 @@ +# Swiss QR Bill for .NET Reference Documentation + +## Reference Documentation + +**[Codecrete.SwissQRBill.Generator.QRBill](xref:Codecrete.SwissQRBill.Generator.QRBill)**: Generates Swiss QR bill (receipt and payment part). Also validates the bill data and encode and decode the text embedded in the QR code. + +**[Codecrete.SwissQRBill.Generator.QRBill](xref:Codecrete.SwissQRBill.Generator.Bill)**: QR bill data as input for generation or output from decoding + +**[Codecrete.SwissQRBill.Generator.Payments](xref:Codecrete.SwissQRBill.Generator.Payments)**: Utility for generating and validation payment related data such as IBAN and reference numbers. + +[All types and classes](xref:Codecrete.SwissQRBill.Generator) + + +Generates QR Codes from text strings and byte arrays. + +This project aims to be the best, clearest QR Code generator library. The primary goals are flexible options +and absolute correctness. Secondary goals are compact implementation size and good documentation comments. + +Home page with live JavaScript demo, extensive descriptions, and competitor comparisons: +[https://www.nayuki.io/page/qr-code-generator-library](https://www.nayuki.io/page/qr-code-generator-library) + +## Features + +Core features: + + * Available in 7 programming languages, all with nearly equal functionality: Java, JavaScript, TypeScript, Python, C++, C, Rust + + * Significantly shorter code but more documentation comments compared to competing libraries + + * Supports encoding all 40 versions (sizes) and all 4 error correction levels, as per the QR Code Model 2 standard + + * Output formats: Raw modules/pixels of the QR symbol, SVG XML string, {@code BufferedImage} raster bitmap + + * Encodes numeric and special-alphanumeric text in less space than general text + + * Open source code under the permissive MIT License + + +Manual parameters: + + * User can specify minimum and maximum version numbers allowed, then library will automatically choose smallest version in the range that fits the data + + * User can specify mask pattern manually, otherwise library will automatically evaluate all 8 masks and select the optimal one + + * User can specify absolute error correction level, or allow the library to boost it if it doesn't increase the version number + + * User can create a list of data segments manually and add ECI segments + + +Optional advanced features: + + * Encodes Japanese Unicode text in kanji mode to save a lot of space compared to UTF-8 bytes + + * Computes optimal segment mode switching for text with mixed numeric/alphanumeric/general/kanji parts + +## Examples + +Simple operation: + +```csharp +namespace QrCode { + +} + *
import java.awt.image.BufferedImage;
+ *import java.io.File;
+ *import javax.imageio.ImageIO;
+ *import io.nayuki.qrcodegen.*;
+ *
+ *QrCode qr = QrCode.encodeText("Hello, world!", QrCode.Ecc.MEDIUM);
+ *BufferedImage img = qr.toImage(4, 10);
+ *ImageIO.write(img, "png", new File("qr-code.png"));
+ *

Manual operation:

+ *
import java.util.List;
+ *import io.nayuki.qrcodegen.*;
+ *
+ *List<QrSegment> segs = QrSegment.makeSegments("3141592653589793238462643383");
+ *QrCode qr = QrCode.encodeSegments(segs, QrCode.Ecc.HIGH, 5, 5, 2, false);
+ *for (int y = 0; y < qr.size; y++) {
+ *    for (int x = 0; x < qr.size; x++) {
+ *        (... paint qr.getModule(x, y) ...)
+ *    }
+ *}
+ ``` + + + +## Requirements + +Swiss QR Bill for .NET requires .NET Standard 2.0 or higher, i.e. any of: + +- .NET Core 2.0 or higher +- .NET Framework 4.6.1 or higher +- Mono 5.4 or higher +- Universal Windows Platform 10.0.16299 or higher +- Xamarin diff --git a/dotnet/QrCodeGenerator/docfx/docfx.json b/dotnet/QrCodeGenerator/docfx/docfx.json new file mode 100644 index 0000000..4a69ab8 --- /dev/null +++ b/dotnet/QrCodeGenerator/docfx/docfx.json @@ -0,0 +1,58 @@ +{ + "metadata": [ + { + "src": [ + { + "files": [ + "**.csproj" + ], + "src": ".." + } + ], + "dest": "../obj/docfx/api", + "disableGitFeatures": false, + "disableDefaultFilter": false + } + ], + "build": { + "content": [ + { + "files": [ + "api/**.yml" + ], + "src": "../obj/docfx" + }, + { + "files": [ + "index.md", + "api/index.md" + ] + } + ], + "resource": [ + ], + "overwrite": [ + { + "files": [ + "apidoc/**.md" + ], + "exclude": [ + "obj/**", + "bin/**" + ] + } + ], + "dest": "../bin/_site", + "globalMetadataFiles": [], + "fileMetadataFiles": [], + "template": [ + "default" + ], + "postProcessors": [], + "markdownEngineName": "markdig", + "noLangKeyword": false, + "keepFileLink": false, + "cleanupCacheHistory": false, + "disableGitFeatures": false + } +} \ No newline at end of file diff --git a/dotnet/QrCodeGenerator/docfx/index.md b/dotnet/QrCodeGenerator/docfx/index.md new file mode 100644 index 0000000..830ec1a --- /dev/null +++ b/dotnet/QrCodeGenerator/docfx/index.md @@ -0,0 +1,5 @@ +# QR Code generator library for .NET + +## .NET API Documention + +[Swiss QR Bill .NET Reference Documentation](api/index.md) diff --git a/dotnet/QrCodeGeneratorDemo/Program.cs b/dotnet/QrCodeGeneratorDemo/Program.cs index d26ef88..a946181 100644 --- a/dotnet/QrCodeGeneratorDemo/Program.cs +++ b/dotnet/QrCodeGeneratorDemo/Program.cs @@ -26,7 +26,7 @@ using System.IO; using System.Drawing.Imaging; using System.Text; -namespace Io.Nayuki.QrCodeGen.Demo +namespace IO.Nayuki.QrCodeGen.Demo { internal class Program { diff --git a/dotnet/QrCodeGeneratorDemo/QrCodeGeneratorDemo.csproj b/dotnet/QrCodeGeneratorDemo/QrCodeGeneratorDemo.csproj index a8f7e4b..a358e6a 100644 --- a/dotnet/QrCodeGeneratorDemo/QrCodeGeneratorDemo.csproj +++ b/dotnet/QrCodeGeneratorDemo/QrCodeGeneratorDemo.csproj @@ -3,8 +3,8 @@ Exe netcoreapp2.2 - Io.Nayuki.QrCodeGen.Demo - Io.Nayuki.QrCodeGen.Demo + IO.Nayuki.QrCodeGen.Demo + IO.Nayuki.QrCodeGen.Demo 1.4.1 Project Nayuki QR Code Generator for .NET diff --git a/dotnet/QrCodeGeneratorTest/BitArrayExtensionsTest.cs b/dotnet/QrCodeGeneratorTest/BitArrayExtensionsTest.cs index 8d8fef2..b0df70c 100644 --- a/dotnet/QrCodeGeneratorTest/BitArrayExtensionsTest.cs +++ b/dotnet/QrCodeGeneratorTest/BitArrayExtensionsTest.cs @@ -25,7 +25,7 @@ using System; using System.Collections; using Xunit; -namespace Io.Nayuki.QrCodeGen.Test +namespace IO.Nayuki.QrCodeGen.Test { public class BitArrayExtensionsTest { diff --git a/dotnet/QrCodeGeneratorTest/KanjiTest.cs b/dotnet/QrCodeGeneratorTest/KanjiTest.cs index af59b2e..efa7810 100644 --- a/dotnet/QrCodeGeneratorTest/KanjiTest.cs +++ b/dotnet/QrCodeGeneratorTest/KanjiTest.cs @@ -24,7 +24,7 @@ using System.Collections.Generic; using Xunit; -namespace Io.Nayuki.QrCodeGen.Test +namespace IO.Nayuki.QrCodeGen.Test { public class KanjiTest { diff --git a/dotnet/QrCodeGeneratorTest/OptimalSegmentTest.cs b/dotnet/QrCodeGeneratorTest/OptimalSegmentTest.cs index 0f4ae49..beeb35d 100644 --- a/dotnet/QrCodeGeneratorTest/OptimalSegmentTest.cs +++ b/dotnet/QrCodeGeneratorTest/OptimalSegmentTest.cs @@ -21,10 +21,9 @@ * Software. */ -using System.Collections.Generic; using Xunit; -namespace Io.Nayuki.QrCodeGen.Test +namespace IO.Nayuki.QrCodeGen.Test { public class OptimalSegmentTest { diff --git a/dotnet/QrCodeGeneratorTest/PngTest.cs b/dotnet/QrCodeGeneratorTest/PngTest.cs index 6ffa250..0565524 100644 --- a/dotnet/QrCodeGeneratorTest/PngTest.cs +++ b/dotnet/QrCodeGeneratorTest/PngTest.cs @@ -23,9 +23,9 @@ using System.Drawing.Imaging; using Xunit; -using static Io.Nayuki.QrCodeGen.QrCode; +using static IO.Nayuki.QrCodeGen.QrCode; -namespace Io.Nayuki.QrCodeGen.Test +namespace IO.Nayuki.QrCodeGen.Test { public class PngTest { diff --git a/dotnet/QrCodeGeneratorTest/QrCodeGeneratorTest.csproj b/dotnet/QrCodeGeneratorTest/QrCodeGeneratorTest.csproj index db8bf84..0b39412 100644 --- a/dotnet/QrCodeGeneratorTest/QrCodeGeneratorTest.csproj +++ b/dotnet/QrCodeGeneratorTest/QrCodeGeneratorTest.csproj @@ -5,9 +5,9 @@ false - Io.Nayuki.QrCodeGen.Test + IO.Nayuki.QrCodeGen.Test - Io.Nayuki.QrCodeGen.Test + IO.Nayuki.QrCodeGen.Test 1.4.1 diff --git a/dotnet/QrCodeGeneratorTest/QrCodeTest.cs b/dotnet/QrCodeGeneratorTest/QrCodeTest.cs index 9e65547..d672fe0 100644 --- a/dotnet/QrCodeGeneratorTest/QrCodeTest.cs +++ b/dotnet/QrCodeGeneratorTest/QrCodeTest.cs @@ -23,9 +23,9 @@ using System.Text; using Xunit; -using static Io.Nayuki.QrCodeGen.QrCode; +using static IO.Nayuki.QrCodeGen.QrCode; -namespace Io.Nayuki.QrCodeGen.Test +namespace IO.Nayuki.QrCodeGen.Test { public class QrCodeTest { diff --git a/dotnet/QrCodeGeneratorTest/QrSegmentEncodingTest.cs b/dotnet/QrCodeGeneratorTest/QrSegmentEncodingTest.cs index 5f33238..e659fbe 100644 --- a/dotnet/QrCodeGeneratorTest/QrSegmentEncodingTest.cs +++ b/dotnet/QrCodeGeneratorTest/QrSegmentEncodingTest.cs @@ -27,7 +27,7 @@ using System.Collections.Generic; using System.Text; using Xunit; -namespace Io.Nayuki.QrCodeGen.Test +namespace IO.Nayuki.QrCodeGen.Test { public class QrSegmentEncodingTest { diff --git a/dotnet/QrCodeGeneratorTest/QrSegmentRegexTest.cs b/dotnet/QrCodeGeneratorTest/QrSegmentRegexTest.cs index 3413ed6..5b3f784 100644 --- a/dotnet/QrCodeGeneratorTest/QrSegmentRegexTest.cs +++ b/dotnet/QrCodeGeneratorTest/QrSegmentRegexTest.cs @@ -23,7 +23,7 @@ using Xunit; -namespace Io.Nayuki.QrCodeGen.Test +namespace IO.Nayuki.QrCodeGen.Test { public class QrSegmentRegexTest { diff --git a/dotnet/QrCodeGeneratorTest/SvgTest.cs b/dotnet/QrCodeGeneratorTest/SvgTest.cs index 7e804d7..4f49e63 100644 --- a/dotnet/QrCodeGeneratorTest/SvgTest.cs +++ b/dotnet/QrCodeGeneratorTest/SvgTest.cs @@ -24,9 +24,9 @@ using System.IO; using System.Text; using Xunit; -using static Io.Nayuki.QrCodeGen.QrCode; +using static IO.Nayuki.QrCodeGen.QrCode; -namespace Io.Nayuki.QrCodeGen.Test +namespace IO.Nayuki.QrCodeGen.Test { public class SvgTest { diff --git a/dotnet/QrCodeGeneratorTest/TestHelper.cs b/dotnet/QrCodeGeneratorTest/TestHelper.cs index 3c327e7..6aa292a 100644 --- a/dotnet/QrCodeGeneratorTest/TestHelper.cs +++ b/dotnet/QrCodeGeneratorTest/TestHelper.cs @@ -22,7 +22,7 @@ */ -namespace Io.Nayuki.QrCodeGen.Test +namespace IO.Nayuki.QrCodeGen.Test { internal class TestHelper {