Skip to content

Commit

Permalink
Added .NET6-windows support
Browse files Browse the repository at this point in the history
  • Loading branch information
codebude committed Dec 12, 2021
1 parent 2c78d05 commit 84afafc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
8 changes: 7 additions & 1 deletion QRCoder/ArtQRCode.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if NETFRAMEWORK || NETSTANDARD2_0 || NET5_0
#if NETFRAMEWORK || NETSTANDARD2_0 || NET5_0 || NET6_0_WINDOWS

using System;
using System.Drawing;
Expand All @@ -9,6 +9,9 @@
// pull request raised to extend library used.
namespace QRCoder
{
#if NET6_0_WINDOWS
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
#endif
public class ArtQRCode : AbstractQRCode, IDisposable
{
/// <summary>
Expand Down Expand Up @@ -254,6 +257,9 @@ public enum BackgroundImageStyle
}
}

#if NET6_0_WINDOWS
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
#endif
public static class ArtQRCodeHelper
{
/// <summary>
Expand Down
8 changes: 7 additions & 1 deletion QRCoder/Base64QRCode.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if NETFRAMEWORK || NETSTANDARD2_0 || NET5_0
#if NETFRAMEWORK || NETSTANDARD2_0 || NET5_0 || NET6_0_WINDOWS
using System;
using System.Drawing;
using System.Drawing.Imaging;
Expand All @@ -8,6 +8,9 @@

namespace QRCoder
{
#if NET6_0_WINDOWS
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
#endif
public class Base64QRCode : AbstractQRCode, IDisposable
{
private QRCode qr;
Expand Down Expand Up @@ -94,6 +97,9 @@ public enum ImageType

}

#if NET6_0_WINDOWS
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
#endif
public static class Base64QRCodeHelper
{
public static string GetQRCode(string plainText, int pixelsPerModule, string darkColorHtmlHex, string lightColorHtmlHex, ECCLevel eccLevel, bool forceUtf8 = false, bool utf8BOM = false, EciMode eciMode = EciMode.Default, int requestedVersion = -1, bool drawQuietZones = true, ImageType imgType = ImageType.Png)
Expand Down
8 changes: 7 additions & 1 deletion QRCoder/PdfByteQRCode.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if NETFRAMEWORK || NETSTANDARD2_0 || NET5_0
#if NETFRAMEWORK || NETSTANDARD2_0 || NET5_0 || NET6_0_WINDOWS
using System;
using System.Collections.Generic;
using System.Drawing.Imaging;
Expand All @@ -11,6 +11,9 @@
namespace QRCoder
{

#if NET6_0_WINDOWS
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
#endif
// ReSharper disable once InconsistentNaming
public class PdfByteQRCode : AbstractQRCode, IDisposable
{
Expand Down Expand Up @@ -210,6 +213,9 @@ public byte[] GetGraphic(int pixelsPerModule, string darkColorHtmlHex, string li
}
}

#if NET6_0_WINDOWS
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
#endif
public static class PdfByteQRCodeHelper
{
public static byte[] GetQRCode(string plainText, int pixelsPerModule, string darkColorHtmlHex,
Expand Down

0 comments on commit 84afafc

Please sign in to comment.