Skip to content

Commit

Permalink
Include documentation into NuGet package
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelbl committed Dec 10, 2021
1 parent af83f92 commit a34c324
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 16 deletions.
12 changes: 10 additions & 2 deletions QrCodeGenerator/QrCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,21 @@ public bool GetModule(int x, int y)
return 0 <= x && x < Size && 0 <= y && y < Size && _modules[y * Size + x];
}

/// <summary>
/// Creates an SVG image of this QR code.
/// <para>
/// The images uses Unix newlines (\n), regardless of the platform.
/// </para>
/// </summary>
/// <param name="border">The border width, as a factor of the module (QR code pixel) size</param>
/// <returns>The SVG image as a string.</returns>
public string ToSvgString(int border)
{
return ToSvgString(border, "#000000", "#ffffff");
}

/// <summary>
/// Creates an SVG image of this QR code.
/// <para>
/// The images uses Unix newlines (\n), regardless of the platform.
/// </para>
Expand All @@ -377,10 +386,9 @@ public string ToSvgString(int border)
/// "#339966", "fuchsia", "rgba(137, 23, 89, 0.3)".
/// </para>
/// </summary>
/// <inheritdoc cref="ToSvgString(int)"/>
/// <param name="border">The border width, as a factor of the module (QR code pixel) size</param>
/// <param name="foreground">The foreground color.</param>
/// <param name="background">The background color.</param>
/// <returns></returns>
public string ToSvgString(int border, string foreground, string background)
{
if (border < 0)
Expand Down
13 changes: 8 additions & 5 deletions QrCodeGenerator/QrCodeGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>Net.Codecrete.QrCodeGenerator</RootNamespace>
<PackageId>Net.Codecrete.QrCodeGenerator</PackageId>
<Version>2.0.0</Version>
<Version>2.0.1</Version>
<Authors>Manuel Bleichenbacher, Project Nayuki</Authors>
<Product>QR Code Generator for .NET</Product>
<Description>QR Code Generator for .NET – simple, compact and well. Derived from tried and tested implementation by project Nayuki.
Expand All @@ -31,19 +31,22 @@ Optional advanced features:
<PackageProjectUrl>https://github.com/manuelbl/QrCodeGenerator</PackageProjectUrl>
<PackageLicenseUrl></PackageLicenseUrl>
<PackageTags>qr code, qrcode, kanji, qrcode generator, svg</PackageTags>
<PackageReleaseNotes>New in releases 2.0:
<PackageReleaseNotes>New in releases 2.0 / 2.0.1:
- Fully compatible with .NET 6 (no longer depends on System.Drawing)
- Separate ToBitmap() implementations for System.Drawing, SkiaSharp and ImageSharp
- Documentation included into NuGet package
</PackageReleaseNotes>
<Company>Codecrete</Company>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>Key.snk</AssemblyOriginatorKeyFile>
<AssemblyVersion>1.6.0.0</AssemblyVersion>
<FileVersion>2.0.0.0</FileVersion>
<FileVersion>2.0.1.0</FileVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>

<PropertyGroup>
<PropertyGroup Label="Restoring">
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<RestoreLockedMode Condition="$(ContinuousIntegrationBuild) == 'true'">true</RestoreLockedMode>
</PropertyGroup>
Expand All @@ -55,7 +58,7 @@ Optional advanced features:
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.*" PrivateAssets="all" />
</ItemGroup>

<Target Name="ValidateNuGetPackage" AfterTargets="Pack">
Expand Down
18 changes: 9 additions & 9 deletions QrCodeGenerator/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
".NETStandard,Version=v2.0": {
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
"requested": "[1.0.0, )",
"resolved": "1.0.0",
"contentHash": "aZyGyGg2nFSxix+xMkPmlmZSsnGQ3w+mIG23LTxJZHN+GPwTQ5FpPgDo7RMOq+Kcf5D4hFWfXkGhoGstawX13Q==",
"requested": "[1.*, )",
"resolved": "1.1.1",
"contentHash": "IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==",
"dependencies": {
"Microsoft.Build.Tasks.Git": "1.0.0",
"Microsoft.SourceLink.Common": "1.0.0"
"Microsoft.Build.Tasks.Git": "1.1.1",
"Microsoft.SourceLink.Common": "1.1.1"
}
},
"NETStandard.Library": {
Expand All @@ -23,8 +23,8 @@
},
"Microsoft.Build.Tasks.Git": {
"type": "Transitive",
"resolved": "1.0.0",
"contentHash": "z2fpmmt+1Jfl+ZnBki9nSP08S1/tbEOxFdsK1rSR+LBehIJz1Xv9/6qOOoGNqlwnAGGVGis1Oj6S8Kt9COEYlQ=="
"resolved": "1.1.1",
"contentHash": "AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q=="
},
"Microsoft.NETCore.Platforms": {
"type": "Transitive",
Expand All @@ -33,8 +33,8 @@
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
"resolved": "1.0.0",
"contentHash": "G8DuQY8/DK5NN+3jm5wcMcd9QYD90UV7MiLmdljSJixi3U/vNaeBKmmXUqI4DJCOeWizIUEh4ALhSt58mR+5eg=="
"resolved": "1.1.1",
"contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg=="
}
}
}
Expand Down

0 comments on commit a34c324

Please sign in to comment.