1
- #if NETFRAMEWORK || NETSTANDARD2_0 || NET5_0 || NET6_0_WINDOWS
1
+ #if NETFRAMEWORK || NETSTANDARD2_0 || NET5_0_OR_GREATER
2
2
using QRCoder . Extensions ;
3
3
using System ;
4
4
using System . Collections ;
11
11
12
12
namespace QRCoder
13
13
{
14
- #if NET6_0_WINDOWS
15
- [ System . Runtime . Versioning . SupportedOSPlatform ( "windows" ) ]
16
- #endif
17
14
public class SvgQRCode : AbstractQRCode , IDisposable
18
15
{
19
16
/// <summary>
@@ -270,13 +267,16 @@ public class SvgLogo
270
267
private object _logoRaw;
271
268
private bool _isEmbedded;
272
269
273
-
270
+ #if NETFRAMEWORK || NETSTANDARD2_0 || NET5_0 || NET6_0_WINDOWS
274
271
/// <summary>
275
272
/// Create a logo object to be used in SvgQRCode renderer
276
273
/// </summary>
277
274
/// <param name="iconRasterized">Logo to be rendered as Bitmap/rasterized graphic</param>
278
275
/// <param name="iconSizePercent">Degree of percentage coverage of the QR code by the logo</param>
279
276
/// <param name="fillLogoBackground">If true, the background behind the logo will be cleaned</param>
277
+ #if NET6_0_WINDOWS
278
+ [System.Runtime.Versioning.SupportedOSPlatform("windows")]
279
+ #endif
280
280
public SvgLogo(Bitmap iconRasterized, int iconSizePercent = 15, bool fillLogoBackground = true)
281
281
{
282
282
_iconSizePercent = iconSizePercent;
@@ -293,6 +293,7 @@ public SvgLogo(Bitmap iconRasterized, int iconSizePercent = 15, bool fillLogoBac
293
293
_logoRaw = iconRasterized;
294
294
_isEmbedded = false;
295
295
}
296
+ #endif
296
297
297
298
/// <summary>
298
299
/// Create a logo object to be used in SvgQRCode renderer
@@ -379,9 +380,6 @@ public enum MediaType : int
379
380
}
380
381
}
381
382
382
- #if NET6_0_WINDOWS
383
- [System.Runtime.Versioning.SupportedOSPlatform("windows")]
384
- #endif
385
383
public static class SvgQRCodeHelper
386
384
{
387
385
public static string GetQRCode(string plainText, int pixelsPerModule, string darkColorHex, string lightColorHex, ECCLevel eccLevel, bool forceUtf8 = false, bool utf8BOM = false, EciMode eciMode = EciMode.Default, int requestedVersion = -1, bool drawQuietZones = true, SizingMode sizingMode = SizingMode.WidthHeightAttribute, SvgLogo logo = null)
0 commit comments