Skip to content

Commit 84afafc

Browse files
committed
Added .NET6-windows support
1 parent 2c78d05 commit 84afafc

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

QRCoder/ArtQRCode.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if NETFRAMEWORK || NETSTANDARD2_0 || NET5_0
1+
#if NETFRAMEWORK || NETSTANDARD2_0 || NET5_0 || NET6_0_WINDOWS
22

33
using System;
44
using System.Drawing;
@@ -9,6 +9,9 @@
99
// pull request raised to extend library used.
1010
namespace QRCoder
1111
{
12+
#if NET6_0_WINDOWS
13+
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
14+
#endif
1215
public class ArtQRCode : AbstractQRCode, IDisposable
1316
{
1417
/// <summary>
@@ -254,6 +257,9 @@ public enum BackgroundImageStyle
254257
}
255258
}
256259

260+
#if NET6_0_WINDOWS
261+
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
262+
#endif
257263
public static class ArtQRCodeHelper
258264
{
259265
/// <summary>

QRCoder/Base64QRCode.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if NETFRAMEWORK || NETSTANDARD2_0 || NET5_0
1+
#if NETFRAMEWORK || NETSTANDARD2_0 || NET5_0 || NET6_0_WINDOWS
22
using System;
33
using System.Drawing;
44
using System.Drawing.Imaging;
@@ -8,6 +8,9 @@
88

99
namespace QRCoder
1010
{
11+
#if NET6_0_WINDOWS
12+
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
13+
#endif
1114
public class Base64QRCode : AbstractQRCode, IDisposable
1215
{
1316
private QRCode qr;
@@ -94,6 +97,9 @@ public enum ImageType
9497

9598
}
9699

100+
#if NET6_0_WINDOWS
101+
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
102+
#endif
97103
public static class Base64QRCodeHelper
98104
{
99105
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)

QRCoder/PdfByteQRCode.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if NETFRAMEWORK || NETSTANDARD2_0 || NET5_0
1+
#if NETFRAMEWORK || NETSTANDARD2_0 || NET5_0 || NET6_0_WINDOWS
22
using System;
33
using System.Collections.Generic;
44
using System.Drawing.Imaging;
@@ -11,6 +11,9 @@
1111
namespace QRCoder
1212
{
1313

14+
#if NET6_0_WINDOWS
15+
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
16+
#endif
1417
// ReSharper disable once InconsistentNaming
1518
public class PdfByteQRCode : AbstractQRCode, IDisposable
1619
{
@@ -210,6 +213,9 @@ public byte[] GetGraphic(int pixelsPerModule, string darkColorHtmlHex, string li
210213
}
211214
}
212215

216+
#if NET6_0_WINDOWS
217+
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
218+
#endif
213219
public static class PdfByteQRCodeHelper
214220
{
215221
public static byte[] GetQRCode(string plainText, int pixelsPerModule, string darkColorHtmlHex,

0 commit comments

Comments
 (0)