From d013fc6a98979268100820ed4ae7f280100d6be7 Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Tue, 30 Sep 2025 20:24:50 -0400 Subject: [PATCH 1/5] Reference System.Drawing.Common on .NET 6 --- QRCoder/QRCoder.csproj | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/QRCoder/QRCoder.csproj b/QRCoder/QRCoder.csproj index d6170681..88225332 100644 --- a/QRCoder/QRCoder.csproj +++ b/QRCoder/QRCoder.csproj @@ -1,11 +1,9 @@ - + - net35;net40;netstandard1.3;netstandard2.0;net5.0;net5.0-windows;net6.0;net6.0-windows + net35;net40;netstandard1.3;netstandard2.0;net5.0;net6.0 false - $(DefineConstants);SYSTEM_DRAWING - $(DefineConstants);NET5_0_WINDOWS - $(DefineConstants);NET6_0_WINDOWS + $(DefineConstants);SYSTEM_DRAWING true true $(WarningsAsErrors);CS1591 @@ -48,11 +46,11 @@ - + - + From 796c07ea4a3010753ccccc10fed9cb1f32c5d145 Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Sun, 5 Oct 2025 16:07:48 -0400 Subject: [PATCH 2/5] update --- QRCoder/QRCoder.csproj | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/QRCoder/QRCoder.csproj b/QRCoder/QRCoder.csproj index aaedb062..0ce46584 100644 --- a/QRCoder/QRCoder.csproj +++ b/QRCoder/QRCoder.csproj @@ -1,12 +1,8 @@  - net35;net40;netstandard1.3;netstandard2.0;net5.0;net6.0 - false - $(DefineConstants);SYSTEM_DRAWING - true - net35;net40;netstandard1.3;netstandard2.0;netstandard2.1;net5.0;net5.0-windows;net6.0;net6.0-windows + net35;net40;netstandard1.3;netstandard2.0;netstandard2.1;net5.0;net6.0 true true @@ -30,12 +26,11 @@ - - + From a77f8d0109045c4f9d112b0deef1f9c57a5a72d3 Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Sun, 5 Oct 2025 16:10:59 -0400 Subject: [PATCH 3/5] update --- Directory.Build.targets | 2 +- .../QRCoder.approved.txt | 0 .../net60-windows/QRCoder.approved.txt | 1021 ----------------- QRCoderApiTests/net60/QRCoder.approved.txt | 59 + QRCoderTests/QRCoderTests.csproj | 2 +- 5 files changed, 61 insertions(+), 1023 deletions(-) rename QRCoderApiTests/{net35+net40+net50+net50-windows+netstandard20+netstandard21 => net35+net40+net50+netstandard20+netstandard21}/QRCoder.approved.txt (100%) delete mode 100644 QRCoderApiTests/net60-windows/QRCoder.approved.txt diff --git a/Directory.Build.targets b/Directory.Build.targets index 604b98fc..a3a4828f 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -2,7 +2,7 @@ - $(DefineConstants);SYSTEM_DRAWING + $(DefineConstants);SYSTEM_DRAWING $(DefineConstants);HAS_SPAN diff --git a/QRCoderApiTests/net35+net40+net50+net50-windows+netstandard20+netstandard21/QRCoder.approved.txt b/QRCoderApiTests/net35+net40+net50+netstandard20+netstandard21/QRCoder.approved.txt similarity index 100% rename from QRCoderApiTests/net35+net40+net50+net50-windows+netstandard20+netstandard21/QRCoder.approved.txt rename to QRCoderApiTests/net35+net40+net50+netstandard20+netstandard21/QRCoder.approved.txt diff --git a/QRCoderApiTests/net60-windows/QRCoder.approved.txt b/QRCoderApiTests/net60-windows/QRCoder.approved.txt deleted file mode 100644 index d50a8826..00000000 --- a/QRCoderApiTests/net60-windows/QRCoder.approved.txt +++ /dev/null @@ -1,1021 +0,0 @@ -namespace QRCoder -{ - public abstract class AbstractQRCode - { - protected AbstractQRCode() { } - protected AbstractQRCode(QRCoder.QRCodeData data) { } - protected QRCoder.QRCodeData QrCodeData { get; set; } - public void Dispose() { } - public virtual void SetQRCodeData(QRCoder.QRCodeData data) { } - } - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - public class ArtQRCode : QRCoder.AbstractQRCode, System.IDisposable - { - public ArtQRCode() { } - public ArtQRCode(QRCoder.QRCodeData data) { } - public System.Drawing.Bitmap GetGraphic(System.Drawing.Bitmap? backgroundImage = null) { } - public System.Drawing.Bitmap GetGraphic(int pixelsPerModule) { } - public System.Drawing.Bitmap GetGraphic(int pixelsPerModule, System.Drawing.Color darkColor, System.Drawing.Color lightColor, System.Drawing.Color backgroundColor, System.Drawing.Bitmap? backgroundImage = null, double pixelSizeFactor = 1, bool drawQuietZones = true, QRCoder.ArtQRCode.QuietZoneStyle quietZoneRenderingStyle = 0, QRCoder.ArtQRCode.BackgroundImageStyle backgroundImageStyle = 1, System.Drawing.Bitmap? finderPatternImage = null) { } - public enum BackgroundImageStyle - { - Fill = 0, - DataAreaOnly = 1, - } - public enum QuietZoneStyle - { - Dotted = 0, - Flat = 1, - } - } - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - public static class ArtQRCodeHelper - { - public static System.Drawing.Bitmap GetQRCode( - string plainText, - int pixelsPerModule, - System.Drawing.Color darkColor, - System.Drawing.Color lightColor, - System.Drawing.Color backgroundColor, - QRCoder.QRCodeGenerator.ECCLevel eccLevel, - bool forceUtf8 = false, - bool utf8BOM = false, - QRCoder.QRCodeGenerator.EciMode eciMode = 0, - int requestedVersion = -1, - System.Drawing.Bitmap? backgroundImage = null, - double pixelSizeFactor = 1, - bool drawQuietZones = true, - QRCoder.ArtQRCode.QuietZoneStyle quietZoneRenderingStyle = 1, - QRCoder.ArtQRCode.BackgroundImageStyle backgroundImageStyle = 1, - System.Drawing.Bitmap? finderPatternImage = null) { } - } - public class AsciiQRCode : QRCoder.AbstractQRCode, System.IDisposable - { - public AsciiQRCode() { } - public AsciiQRCode(QRCoder.QRCodeData data) { } - public string GetGraphic(int repeatPerModule, string darkColorString = "██", string whiteSpaceString = " ", bool drawQuietZones = true, string endOfLine = " -") { } - public string GetGraphicSmall(bool drawQuietZones = true, bool invert = false, string endOfLine = " -") { } - public string[] GetLineByLineGraphic(int repeatPerModule, string darkColorString = "██", string whiteSpaceString = " ", bool drawQuietZones = true) { } - } - public static class AsciiQRCodeHelper - { - public static string GetQRCode(string plainText, QRCoder.QRCodeGenerator.ECCLevel eccLevel, bool forceUtf8 = false, bool utf8BOM = false, QRCoder.QRCodeGenerator.EciMode eciMode = 0, int requestedVersion = -1, string endOfLine = " -", bool drawQuietZones = true, bool invert = true) { } - public static string GetQRCode(string plainText, int pixelsPerModule, string darkColorString, string whiteSpaceString, QRCoder.QRCodeGenerator.ECCLevel eccLevel, bool forceUtf8 = false, bool utf8BOM = false, QRCoder.QRCodeGenerator.EciMode eciMode = 0, int requestedVersion = -1, string endOfLine = " -", bool drawQuietZones = true) { } - } - public class Base64QRCode : QRCoder.AbstractQRCode, System.IDisposable - { - public Base64QRCode() { } - public Base64QRCode(QRCoder.QRCodeData data) { } - public string GetGraphic(int pixelsPerModule) { } - public string GetGraphic(int pixelsPerModule, System.Drawing.Color darkColor, System.Drawing.Color lightColor, bool drawQuietZones = true, QRCoder.Base64QRCode.ImageType imgType = 2) { } - public string GetGraphic(int pixelsPerModule, string darkColorHtmlHex, string lightColorHtmlHex, bool drawQuietZones = true, QRCoder.Base64QRCode.ImageType imgType = 2) { } - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - public string GetGraphic(int pixelsPerModule, System.Drawing.Color darkColor, System.Drawing.Color lightColor, System.Drawing.Bitmap icon, int iconSizePercent = 15, int iconBorderWidth = 6, bool drawQuietZones = true, QRCoder.Base64QRCode.ImageType imgType = 2) { } - public enum ImageType - { - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - Gif = 0, - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - Jpeg = 1, - Png = 2, - } - } - public static class Base64QRCodeHelper - { - public static string GetQRCode(string plainText, int pixelsPerModule, string darkColorHtmlHex, string lightColorHtmlHex, QRCoder.QRCodeGenerator.ECCLevel eccLevel, bool forceUtf8 = false, bool utf8BOM = false, QRCoder.QRCodeGenerator.EciMode eciMode = 0, int requestedVersion = -1, bool drawQuietZones = true, QRCoder.Base64QRCode.ImageType imgType = 2) { } - } - public class BitmapByteQRCode : QRCoder.AbstractQRCode, System.IDisposable - { - public BitmapByteQRCode() { } - public BitmapByteQRCode(QRCoder.QRCodeData data) { } - public byte[] GetGraphic(int pixelsPerModule) { } - public byte[] GetGraphic(int pixelsPerModule, byte[] darkColorRgb, byte[] lightColorRgb) { } - public byte[] GetGraphic(int pixelsPerModule, string darkColorHtmlHex, string lightColorHtmlHex) { } - } - public static class BitmapByteQRCodeHelper - { - public static byte[] GetQRCode(string txt, QRCoder.QRCodeGenerator.ECCLevel eccLevel, int size) { } - public static byte[] GetQRCode(string plainText, int pixelsPerModule, string darkColorHtmlHex, string lightColorHtmlHex, QRCoder.QRCodeGenerator.ECCLevel eccLevel, bool forceUtf8 = false, bool utf8BOM = false, QRCoder.QRCodeGenerator.EciMode eciMode = 0, int requestedVersion = -1) { } - } - public static class PayloadGenerator - { - public static bool ChecksumMod10(string digits) { } - public class BezahlCode : QRCoder.PayloadGenerator.Payload - { - public BezahlCode(QRCoder.PayloadGenerator.BezahlCode.AuthorityType authority, string name, string account = "", string bnc = "", string iban = "", string bic = "", string reason = "") { } - public BezahlCode(QRCoder.PayloadGenerator.BezahlCode.AuthorityType authority, string name, string account, string bnc, decimal amount, string periodicTimeunit = "", int periodicTimeunitRotation = 0, System.DateTime? periodicFirstExecutionDate = default, System.DateTime? periodicLastExecutionDate = default, string reason = "", int postingKey = 0, QRCoder.PayloadGenerator.BezahlCode.Currency currency = 978, System.DateTime? executionDate = default) { } - public BezahlCode( - QRCoder.PayloadGenerator.BezahlCode.AuthorityType authority, - string name, - string iban, - string bic, - decimal amount, - string periodicTimeunit = "", - int periodicTimeunitRotation = 0, - System.DateTime? periodicFirstExecutionDate = default, - System.DateTime? periodicLastExecutionDate = default, - string creditorId = "", - string mandateId = "", - System.DateTime? dateOfSignature = default, - string reason = "", - string sepaReference = "", - QRCoder.PayloadGenerator.BezahlCode.Currency currency = 978, - System.DateTime? executionDate = default) { } - public BezahlCode( - QRCoder.PayloadGenerator.BezahlCode.AuthorityType authority, - string name, - string account, - string bnc, - string iban, - string bic, - decimal amount, - string periodicTimeunit = "", - int periodicTimeunitRotation = 0, - System.DateTime? periodicFirstExecutionDate = default, - System.DateTime? periodicLastExecutionDate = default, - string creditorId = "", - string mandateId = "", - System.DateTime? dateOfSignature = default, - string reason = "", - int postingKey = 0, - string sepaReference = "", - QRCoder.PayloadGenerator.BezahlCode.Currency currency = 978, - System.DateTime? executionDate = default, - int internalMode = 0) { } - public override string ToString() { } - public enum AuthorityType - { - [System.Obsolete] - singlepayment = 0, - singlepaymentsepa = 1, - [System.Obsolete] - singledirectdebit = 2, - singledirectdebitsepa = 3, - [System.Obsolete] - periodicsinglepayment = 4, - periodicsinglepaymentsepa = 5, - contact = 6, - contact_v2 = 7, - } - public class BezahlCodeException : System.Exception - { - public BezahlCodeException() { } - public BezahlCodeException(string message) { } - public BezahlCodeException(string message, System.Exception inner) { } - } - public enum Currency - { - AED = 784, - AFN = 971, - ALL = 8, - AMD = 51, - ANG = 532, - AOA = 973, - ARS = 32, - AUD = 36, - AWG = 533, - AZN = 944, - BAM = 977, - BBD = 52, - BDT = 50, - BGN = 975, - BHD = 48, - BIF = 108, - BMD = 60, - BND = 96, - BOB = 68, - BOV = 984, - BRL = 986, - BSD = 44, - BTN = 64, - BWP = 72, - BYR = 974, - BZD = 84, - CAD = 124, - CDF = 976, - CHE = 947, - CHF = 756, - CHW = 948, - CLF = 990, - CLP = 152, - CNY = 156, - COP = 170, - COU = 970, - CRC = 188, - CUC = 931, - CUP = 192, - CVE = 132, - CZK = 203, - DJF = 262, - DKK = 208, - DOP = 214, - DZD = 12, - EGP = 818, - ERN = 232, - ETB = 230, - EUR = 978, - FJD = 242, - FKP = 238, - GBP = 826, - GEL = 981, - GHS = 936, - GIP = 292, - GMD = 270, - GNF = 324, - GTQ = 320, - GYD = 328, - HKD = 344, - HNL = 340, - HRK = 191, - HTG = 332, - HUF = 348, - IDR = 360, - ILS = 376, - INR = 356, - IQD = 368, - IRR = 364, - ISK = 352, - JMD = 388, - JOD = 400, - JPY = 392, - KES = 404, - KGS = 417, - KHR = 116, - KMF = 174, - KPW = 408, - KRW = 410, - KWD = 414, - KYD = 136, - KZT = 398, - LAK = 418, - LBP = 422, - LKR = 144, - LRD = 430, - LSL = 426, - LYD = 434, - MAD = 504, - MDL = 498, - MGA = 969, - MKD = 807, - MMK = 104, - MNT = 496, - MOP = 446, - MRO = 478, - MUR = 480, - MVR = 462, - MWK = 454, - MXN = 484, - MXV = 979, - MYR = 458, - MZN = 943, - NAD = 516, - NGN = 566, - NIO = 558, - NOK = 578, - NPR = 524, - NZD = 554, - OMR = 512, - PAB = 590, - PEN = 604, - PGK = 598, - PHP = 608, - PKR = 586, - PLN = 985, - PYG = 600, - QAR = 634, - RON = 946, - RSD = 941, - RUB = 643, - RWF = 646, - SAR = 682, - SBD = 90, - SCR = 690, - SDG = 938, - SEK = 752, - SGD = 702, - SHP = 654, - SLL = 694, - SOS = 706, - SRD = 968, - SSP = 728, - STD = 678, - SVC = 222, - SYP = 760, - SZL = 748, - THB = 764, - TJS = 972, - TMT = 934, - TND = 788, - TOP = 776, - TRY = 949, - TTD = 780, - TWD = 901, - TZS = 834, - UAH = 980, - UGX = 800, - USD = 840, - USN = 997, - UYI = 940, - UYU = 858, - UZS = 860, - VEF = 937, - VND = 704, - VUV = 548, - WST = 882, - XAF = 950, - XAG = 961, - XAU = 959, - XBA = 955, - XBB = 956, - XBC = 957, - XBD = 958, - XCD = 951, - XDR = 960, - XOF = 952, - XPD = 964, - XPF = 953, - XPT = 962, - XSU = 994, - XTS = 963, - XUA = 965, - XXX = 999, - YER = 886, - ZAR = 710, - ZMW = 967, - ZWL = 932, - } - } - public class BitcoinAddress : QRCoder.PayloadGenerator.BitcoinLikeCryptoCurrencyAddress - { - public BitcoinAddress(string address, double? amount, string? label = null, string? message = null) { } - } - public class BitcoinCashAddress : QRCoder.PayloadGenerator.BitcoinLikeCryptoCurrencyAddress - { - public BitcoinCashAddress(string address, double? amount, string? label = null, string? message = null) { } - } - public class BitcoinLikeCryptoCurrencyAddress : QRCoder.PayloadGenerator.Payload - { - public BitcoinLikeCryptoCurrencyAddress(QRCoder.PayloadGenerator.BitcoinLikeCryptoCurrencyAddress.BitcoinLikeCryptoCurrencyType currencyType, string address, double? amount, string? label = null, string? message = null) { } - public override string ToString() { } - public enum BitcoinLikeCryptoCurrencyType - { - Bitcoin = 0, - BitcoinCash = 1, - Litecoin = 2, - } - } - public class Bookmark : QRCoder.PayloadGenerator.Payload - { - public Bookmark(string url, string title) { } - public override string ToString() { } - } - public class CalendarEvent : QRCoder.PayloadGenerator.Payload - { - public CalendarEvent(string subject, string? description, string? location, System.DateTime start, System.DateTime end, bool allDayEvent, QRCoder.PayloadGenerator.CalendarEvent.EventEncoding encoding = 1) { } - public CalendarEvent(string subject, string? description, string? location, System.DateTimeOffset start, System.DateTimeOffset end, bool allDayEvent, QRCoder.PayloadGenerator.CalendarEvent.EventEncoding encoding = 1) { } - public override string ToString() { } - public enum EventEncoding - { - iCalComplete = 0, - Universal = 1, - } - } - public class ContactData : QRCoder.PayloadGenerator.Payload - { - public ContactData( - QRCoder.PayloadGenerator.ContactData.ContactOutputType outputType, - string firstname, - string lastname, - string? nickname = null, - string? phone = null, - string? mobilePhone = null, - string? workPhone = null, - string? email = null, - System.DateTime? birthday = default, - string? website = null, - string? street = null, - string? houseNumber = null, - string? city = null, - string? zipCode = null, - string? country = null, - string? note = null, - string? stateRegion = null, - QRCoder.PayloadGenerator.ContactData.AddressOrder addressOrder = 0, - string? org = null, - string? orgTitle = null) { } - public ContactData( - QRCoder.PayloadGenerator.ContactData.ContactOutputType outputType, - string firstname, - string lastname, - string? nickname, - string? phone, - string? mobilePhone, - string? workPhone, - string? email, - System.DateTime? birthday, - string? website, - string? street, - string? houseNumber, - string? city, - string? zipCode, - string? country, - string? note, - string? stateRegion, - QRCoder.PayloadGenerator.ContactData.AddressOrder addressOrder, - string? org, - string? orgTitle, - QRCoder.PayloadGenerator.ContactData.AddressType addressType) { } - public override string ToString() { } - public enum AddressOrder - { - Default = 0, - Reversed = 1, - } - public enum AddressType - { - Home = 0, - Work = 1, - HomePreferred = 2, - WorkPreferred = 3, - } - public enum ContactOutputType - { - MeCard = 0, - VCard21 = 1, - VCard3 = 2, - VCard4 = 3, - } - } - public class Geolocation : QRCoder.PayloadGenerator.Payload - { - public Geolocation(string latitude, string longitude, QRCoder.PayloadGenerator.Geolocation.GeolocationEncoding encoding = 0) { } - public override string ToString() { } - public enum GeolocationEncoding - { - GEO = 0, - GoogleMaps = 1, - } - } - public class Girocode : QRCoder.PayloadGenerator.Payload - { - public Girocode(string iban, string? bic, string name, decimal amount, string remittanceInformation = "", QRCoder.PayloadGenerator.Girocode.TypeOfRemittance typeOfRemittance = 1, string purposeOfCreditTransfer = "", string messageToGirocodeUser = "", QRCoder.PayloadGenerator.Girocode.GirocodeVersion version = 0, QRCoder.PayloadGenerator.Girocode.GirocodeEncoding encoding = 1) { } - public override QRCoder.QRCodeGenerator.ECCLevel EccLevel { get; } - public override string ToString() { } - public enum GirocodeEncoding - { - UTF_8 = 0, - ISO_8859_1 = 1, - ISO_8859_2 = 2, - ISO_8859_4 = 3, - ISO_8859_5 = 4, - ISO_8859_7 = 5, - ISO_8859_10 = 6, - ISO_8859_15 = 7, - } - public class GirocodeException : System.Exception - { - public GirocodeException() { } - public GirocodeException(string message) { } - public GirocodeException(string message, System.Exception inner) { } - } - public enum GirocodeVersion - { - Version1 = 0, - Version2 = 1, - } - public enum TypeOfRemittance - { - Structured = 0, - Unstructured = 1, - } - } - public class LitecoinAddress : QRCoder.PayloadGenerator.BitcoinLikeCryptoCurrencyAddress - { - public LitecoinAddress(string address, double? amount, string? label = null, string? message = null) { } - } - public class MMS : QRCoder.PayloadGenerator.Payload - { - public MMS(string number, QRCoder.PayloadGenerator.MMS.MMSEncoding encoding = 0) { } - public MMS(string number, string subject, QRCoder.PayloadGenerator.MMS.MMSEncoding encoding = 0) { } - public override string ToString() { } - public enum MMSEncoding - { - MMS = 0, - MMSTO = 1, - } - } - public class Mail : QRCoder.PayloadGenerator.Payload - { - public Mail(string? mailReceiver = null, string? subject = null, string? message = null, QRCoder.PayloadGenerator.Mail.MailEncoding encoding = 0) { } - public override string ToString() { } - public enum MailEncoding - { - MAILTO = 0, - MATMSG = 1, - SMTP = 2, - } - } - public class MoneroTransaction : QRCoder.PayloadGenerator.Payload - { - public MoneroTransaction(string address, float? txAmount = default, string? txPaymentId = null, string? recipientName = null, string? txDescription = null) { } - public override string ToString() { } - public class MoneroTransactionException : System.Exception - { - public MoneroTransactionException() { } - public MoneroTransactionException(string message) { } - public MoneroTransactionException(string message, System.Exception inner) { } - } - } - public class OneTimePassword : QRCoder.PayloadGenerator.Payload - { - public OneTimePassword() { } - [System.Obsolete("This property is obsolete, use AuthAlgorithm instead", false)] - public QRCoder.PayloadGenerator.OneTimePassword.OoneTimePasswordAuthAlgorithm Algorithm { get; set; } - public QRCoder.PayloadGenerator.OneTimePassword.OneTimePasswordAuthAlgorithm AuthAlgorithm { get; set; } - public int? Counter { get; set; } - public int Digits { get; set; } - public string? Issuer { get; set; } - public string? Label { get; set; } - public int? Period { get; set; } - public string Secret { get; set; } - public QRCoder.PayloadGenerator.OneTimePassword.OneTimePasswordAuthType Type { get; set; } - public override string ToString() { } - public enum OneTimePasswordAuthAlgorithm - { - SHA1 = 0, - SHA256 = 1, - SHA512 = 2, - } - public enum OneTimePasswordAuthType - { - TOTP = 0, - HOTP = 1, - } - [System.Obsolete("This enum is obsolete, use OneTimePasswordAuthAlgorithm instead", false)] - public enum OoneTimePasswordAuthAlgorithm - { - SHA1 = 0, - SHA256 = 1, - SHA512 = 2, - } - } - public abstract class Payload - { - protected Payload() { } - public virtual QRCoder.QRCodeGenerator.ECCLevel EccLevel { get; } - public virtual QRCoder.QRCodeGenerator.EciMode EciMode { get; } - public virtual int Version { get; } - public abstract override string ToString() { } - } - public class PhoneNumber : QRCoder.PayloadGenerator.Payload - { - public PhoneNumber(string number) { } - public override string ToString() { } - } - public class RussiaPaymentOrder : QRCoder.PayloadGenerator.Payload - { - public RussiaPaymentOrder(string name, string personalAcc, string bankName, string BIC, string correspAcc, QRCoder.PayloadGenerator.RussiaPaymentOrder.OptionalFields? optionalFields = null, QRCoder.PayloadGenerator.RussiaPaymentOrder.CharacterSets characterSet = 2) { } - public byte[] ToBytes() { } - public override string ToString() { } - public enum CharacterSets - { - windows_1251 = 1, - utf_8 = 2, - koi8_r = 3, - } - public class OptionalFields - { - public OptionalFields() { } - public string? AddAmount { get; set; } - public System.DateTime? BirthDate { get; set; } - public string? CBC { get; set; } - public string? Category { get; set; } - public string? ChildFio { get; set; } - public string? ClassNum { get; set; } - public string? Contract { get; set; } - public string? CounterId { get; set; } - public string? CounterVal { get; set; } - public System.DateTime? DocDate { get; set; } - public string? DocIdx { get; set; } - public string? DocNo { get; set; } - public string? DrawerStatus { get; set; } - public string? ExecId { get; set; } - public string? FirstName { get; set; } - public string? Flat { get; set; } - public string? InstNum { get; set; } - public string? KPP { get; set; } - public string? LastName { get; set; } - public string? MiddleName { get; set; } - public string? OKTMO { get; set; } - public string? PayeeINN { get; set; } - public string? PayerAddress { get; set; } - public string? PayerINN { get; set; } - public string? PayerIdNum { get; set; } - public string? PayerIdType { get; set; } - public string? PaymPeriod { get; set; } - public string? PaymTerm { get; set; } - public string? PaytReason { get; set; } - public string? PensAcc { get; set; } - public string? PersAcc { get; set; } - public string? PersonalAccount { get; set; } - public string? Phone { get; set; } - public string? Purpose { get; set; } - public System.DateTime? QuittDate { get; set; } - public string? QuittId { get; set; } - public string? RegType { get; set; } - public string? RuleId { get; set; } - public string? ServiceName { get; set; } - public string? SpecFio { get; set; } - public string? Sum { get; set; } - public string? TaxPaytKind { get; set; } - public string? TaxPeriod { get; set; } - public QRCoder.PayloadGenerator.RussiaPaymentOrder.TechCode? TechCode { get; set; } - public string? UIN { get; set; } - } - public class RussiaPaymentOrderException : System.Exception - { - public RussiaPaymentOrderException(string message) { } - } - public enum TechCode - { - Мобильная_связь_стационарный_телефон = 1, - Коммунальные_услуги_ЖКХAFN = 2, - ГИБДД_налоги_пошлины_бюджетные_платежи = 3, - Охранные_услуги = 4, - Услуги_оказываемые_УФМС = 5, - ПФР = 6, - Погашение_кредитов = 7, - Образовательные_учреждения = 8, - Интернет_и_ТВ = 9, - Электронные_деньги = 10, - Отдых_и_путешествия = 11, - Инвестиции_и_страхование = 12, - Спорт_и_здоровье = 13, - Благотворительные_и_общественные_организации = 14, - Прочие_услуги = 15, - } - } - public class SMS : QRCoder.PayloadGenerator.Payload - { - public SMS(string number, QRCoder.PayloadGenerator.SMS.SMSEncoding encoding = 0) { } - public SMS(string number, string subject, QRCoder.PayloadGenerator.SMS.SMSEncoding encoding = 0) { } - public override string ToString() { } - public enum SMSEncoding - { - SMS = 0, - SMSTO = 1, - SMS_iOS = 2, - } - } - public class ShadowSocksConfig : QRCoder.PayloadGenerator.Payload - { - public ShadowSocksConfig(string hostname, int port, string password, QRCoder.PayloadGenerator.ShadowSocksConfig.Method method, string? tag = null) { } - public ShadowSocksConfig(string hostname, int port, string password, QRCoder.PayloadGenerator.ShadowSocksConfig.Method method, System.Collections.Generic.Dictionary? parameters, string? tag = null) { } - public ShadowSocksConfig(string hostname, int port, string password, QRCoder.PayloadGenerator.ShadowSocksConfig.Method method, string plugin, string? pluginOption, string? tag = null) { } - public override string ToString() { } - public enum Method - { - Chacha20IetfPoly1305 = 0, - Aes128Gcm = 1, - Aes192Gcm = 2, - Aes256Gcm = 3, - XChacha20IetfPoly1305 = 4, - Aes128Cfb = 5, - Aes192Cfb = 6, - Aes256Cfb = 7, - Aes128Ctr = 8, - Aes192Ctr = 9, - Aes256Ctr = 10, - Camellia128Cfb = 11, - Camellia192Cfb = 12, - Camellia256Cfb = 13, - Chacha20Ietf = 14, - Aes256Cb = 15, - Aes128Ofb = 16, - Aes192Ofb = 17, - Aes256Ofb = 18, - Aes128Cfb1 = 19, - Aes192Cfb1 = 20, - Aes256Cfb1 = 21, - Aes128Cfb8 = 22, - Aes192Cfb8 = 23, - Aes256Cfb8 = 24, - Chacha20 = 25, - BfCfb = 26, - Rc4Md5 = 27, - Salsa20 = 28, - DesCfb = 29, - IdeaCfb = 30, - Rc2Cfb = 31, - Cast5Cfb = 32, - Salsa20Ctr = 33, - Rc4 = 34, - SeedCfb = 35, - Table = 36, - } - public class ShadowSocksConfigException : System.Exception - { - public ShadowSocksConfigException() { } - public ShadowSocksConfigException(string message) { } - public ShadowSocksConfigException(string message, System.Exception inner) { } - } - } - public class SkypeCall : QRCoder.PayloadGenerator.Payload - { - public SkypeCall(string skypeUsername) { } - public override string ToString() { } - } - public class SlovenianUpnQr : QRCoder.PayloadGenerator.Payload - { - public SlovenianUpnQr(string payerName, string payerAddress, string payerPlace, string recipientName, string recipientAddress, string recipientPlace, string recipientIban, string description, double amount, string recipientSiModel = "SI00", string recipientSiReference = "", string code = "OTHR") { } - public SlovenianUpnQr(string payerName, string payerAddress, string payerPlace, string recipientName, string recipientAddress, string recipientPlace, string recipientIban, string description, double amount, System.DateTime? deadline, string recipientSiModel = "SI99", string recipientSiReference = "", string code = "OTHR") { } - public override QRCoder.QRCodeGenerator.ECCLevel EccLevel { get; } - public override QRCoder.QRCodeGenerator.EciMode EciMode { get; } - public override int Version { get; } - public override string ToString() { } - } - public class SwissQrCode : QRCoder.PayloadGenerator.Payload - { - public SwissQrCode(QRCoder.PayloadGenerator.SwissQrCode.Iban iban, QRCoder.PayloadGenerator.SwissQrCode.Currency currency, QRCoder.PayloadGenerator.SwissQrCode.Contact creditor, QRCoder.PayloadGenerator.SwissQrCode.Reference reference, QRCoder.PayloadGenerator.SwissQrCode.AdditionalInformation? additionalInformation = null, QRCoder.PayloadGenerator.SwissQrCode.Contact? debitor = null, decimal? amount = default, System.DateTime? requestedDateOfPayment = default, QRCoder.PayloadGenerator.SwissQrCode.Contact? ultimateCreditor = null, string? alternativeProcedure1 = null, string? alternativeProcedure2 = null) { } - public override QRCoder.QRCodeGenerator.ECCLevel EccLevel { get; } - public override QRCoder.QRCodeGenerator.EciMode EciMode { get; } - public override string ToString() { } - public class AdditionalInformation - { - public AdditionalInformation(string? unstructuredMessage = null, string? billInformation = null) { } - public string? BillInformation { get; } - public string Trailer { get; } - public string? UnstructureMessage { get; } - public class SwissQrCodeAdditionalInformationException : System.Exception - { - public SwissQrCodeAdditionalInformationException() { } - public SwissQrCodeAdditionalInformationException(string message) { } - public SwissQrCodeAdditionalInformationException(string message, System.Exception inner) { } - } - } - public class Contact - { - [System.Obsolete("This constructor is deprecated. Use WithCombinedAddress instead.")] - public Contact(string name, string country, string addressLine1, string addressLine2) { } - [System.Obsolete("This constructor is deprecated. Use WithStructuredAddress instead.")] - public Contact(string name, string zipCode, string city, string country, string? street = null, string? houseNumber = null) { } - public override string ToString() { } - public static QRCoder.PayloadGenerator.SwissQrCode.Contact WithCombinedAddress(string name, string country, string addressLine1, string addressLine2) { } - public static QRCoder.PayloadGenerator.SwissQrCode.Contact WithStructuredAddress(string name, string zipCode, string city, string country, string? street = null, string? houseNumber = null) { } - public enum AddressType - { - StructuredAddress = 0, - CombinedAddress = 1, - } - public class SwissQrCodeContactException : System.Exception - { - public SwissQrCodeContactException() { } - public SwissQrCodeContactException(string message) { } - public SwissQrCodeContactException(string message, System.Exception inner) { } - } - } - public enum Currency - { - CHF = 756, - EUR = 978, - } - public class Iban - { - public Iban(string iban, QRCoder.PayloadGenerator.SwissQrCode.Iban.IbanType ibanType) { } - public bool IsQrIban { get; } - public override string ToString() { } - public enum IbanType - { - Iban = 0, - QrIban = 1, - } - public class SwissQrCodeIbanException : System.Exception - { - public SwissQrCodeIbanException() { } - public SwissQrCodeIbanException(string message) { } - public SwissQrCodeIbanException(string message, System.Exception inner) { } - } - } - public class Reference - { - public Reference(QRCoder.PayloadGenerator.SwissQrCode.Reference.ReferenceType referenceType, string? reference = null, QRCoder.PayloadGenerator.SwissQrCode.Reference.ReferenceTextType? referenceTextType = default) { } - public QRCoder.PayloadGenerator.SwissQrCode.Reference.ReferenceType RefType { get; } - public string? ReferenceText { get; } - public enum ReferenceTextType - { - QrReference = 0, - CreditorReferenceIso11649 = 1, - } - public enum ReferenceType - { - QRR = 0, - SCOR = 1, - NON = 2, - } - public class SwissQrCodeReferenceException : System.Exception - { - public SwissQrCodeReferenceException() { } - public SwissQrCodeReferenceException(string message) { } - public SwissQrCodeReferenceException(string message, System.Exception inner) { } - } - } - public class SwissQrCodeException : System.Exception - { - public SwissQrCodeException() { } - public SwissQrCodeException(string message) { } - public SwissQrCodeException(string message, System.Exception inner) { } - } - } - public class Url : QRCoder.PayloadGenerator.Payload - { - public Url(string url) { } - public override string ToString() { } - } - public class WhatsAppMessage : QRCoder.PayloadGenerator.Payload - { - public WhatsAppMessage(string message) { } - public WhatsAppMessage(string number, string message) { } - public override string ToString() { } - } - public class WiFi : QRCoder.PayloadGenerator.Payload - { - public WiFi(string ssid, string password, QRCoder.PayloadGenerator.WiFi.Authentication authenticationMode, bool isHiddenSSID = false, bool escapeHexStrings = true) { } - public override string ToString() { } - public enum Authentication - { - WEP = 0, - WPA = 1, - nopass = 2, - WPA2 = 3, - } - } - } - public class PdfByteQRCode : QRCoder.AbstractQRCode, System.IDisposable - { - public PdfByteQRCode() { } - public PdfByteQRCode(QRCoder.QRCodeData data) { } - public byte[] GetGraphic(int pixelsPerModule) { } - public byte[] GetGraphic(int pixelsPerModule, string darkColorHtmlHex, string lightColorHtmlHex, int dpi = 150, long jpgQuality = 85) { } - } - public static class PdfByteQRCodeHelper - { - public static byte[] GetQRCode(string txt, QRCoder.QRCodeGenerator.ECCLevel eccLevel, int size) { } - public static byte[] GetQRCode(string plainText, int pixelsPerModule, string darkColorHtmlHex, string lightColorHtmlHex, QRCoder.QRCodeGenerator.ECCLevel eccLevel, bool forceUtf8 = false, bool utf8BOM = false, QRCoder.QRCodeGenerator.EciMode eciMode = 0, int requestedVersion = -1) { } - } - public sealed class PngByteQRCode : QRCoder.AbstractQRCode, System.IDisposable - { - public PngByteQRCode() { } - public PngByteQRCode(QRCoder.QRCodeData data) { } - public byte[] GetGraphic(int pixelsPerModule, bool drawQuietZones = true) { } - public byte[] GetGraphic(int pixelsPerModule, byte[] darkColorRgba, byte[] lightColorRgba, bool drawQuietZones = true) { } - public byte[] GetGraphic(int pixelsPerModule, System.Drawing.Color darkColor, System.Drawing.Color lightColor, bool drawQuietZones = true) { } - } - public static class PngByteQRCodeHelper - { - public static byte[] GetQRCode(string txt, QRCoder.QRCodeGenerator.ECCLevel eccLevel, int size, bool drawQuietZones = true) { } - public static byte[] GetQRCode(string plainText, int pixelsPerModule, byte[] darkColorRgba, byte[] lightColorRgba, QRCoder.QRCodeGenerator.ECCLevel eccLevel, bool forceUtf8 = false, bool utf8BOM = false, QRCoder.QRCodeGenerator.EciMode eciMode = 0, int requestedVersion = -1, bool drawQuietZones = true) { } - } - public class PostscriptQRCode : QRCoder.AbstractQRCode, System.IDisposable - { - public PostscriptQRCode() { } - public PostscriptQRCode(QRCoder.QRCodeData data) { } - public string GetGraphic(int pointsPerModule, bool epsFormat = false) { } - public string GetGraphic(System.Drawing.Size viewBox, bool drawQuietZones = true, bool epsFormat = false) { } - public string GetGraphic(System.Drawing.Size viewBox, System.Drawing.Color darkColor, System.Drawing.Color lightColor, bool drawQuietZones = true, bool epsFormat = false) { } - public string GetGraphic(System.Drawing.Size viewBox, string darkColorHex, string lightColorHex, bool drawQuietZones = true, bool epsFormat = false) { } - public string GetGraphic(int pointsPerModule, System.Drawing.Color darkColor, System.Drawing.Color lightColor, bool drawQuietZones = true, bool epsFormat = false) { } - public string GetGraphic(int pointsPerModule, string darkColorHex, string lightColorHex, bool drawQuietZones = true, bool epsFormat = false) { } - } - public static class PostscriptQRCodeHelper - { - public static string GetQRCode(string plainText, int pointsPerModule, string darkColorHex, string lightColorHex, QRCoder.QRCodeGenerator.ECCLevel eccLevel, bool forceUtf8 = false, bool utf8BOM = false, QRCoder.QRCodeGenerator.EciMode eciMode = 0, int requestedVersion = -1, bool drawQuietZones = true, bool epsFormat = false) { } - } - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - public class QRCode : QRCoder.AbstractQRCode, System.IDisposable - { - public QRCode() { } - public QRCode(QRCoder.QRCodeData data) { } - public System.Drawing.Bitmap GetGraphic(int pixelsPerModule) { } - public System.Drawing.Bitmap GetGraphic(int pixelsPerModule, System.Drawing.Color darkColor, System.Drawing.Color lightColor, bool drawQuietZones = true) { } - public System.Drawing.Bitmap GetGraphic(int pixelsPerModule, string darkColorHtmlHex, string lightColorHtmlHex, bool drawQuietZones = true) { } - public System.Drawing.Bitmap GetGraphic(int pixelsPerModule, System.Drawing.Color darkColor, System.Drawing.Color lightColor, System.Drawing.Bitmap? icon = null, int iconSizePercent = 15, int iconBorderWidth = 0, bool drawQuietZones = true, System.Drawing.Color? iconBackgroundColor = default) { } - } - public class QRCodeData : System.IDisposable - { - public QRCodeData(int version) { } - public QRCodeData(byte[] rawData, QRCoder.QRCodeData.Compression compressMode) { } - public QRCodeData(int version, bool addPadding) { } - public QRCodeData(string pathToRawData, QRCoder.QRCodeData.Compression compressMode) { } - public System.Collections.Generic.List ModuleMatrix { get; set; } - public int Version { get; } - public void Dispose() { } - public byte[] GetRawData(QRCoder.QRCodeData.Compression compressMode) { } - public void SaveRawData(string filePath, QRCoder.QRCodeData.Compression compressMode) { } - public enum Compression - { - Uncompressed = 0, - Deflate = 1, - GZip = 2, - } - } - public class QRCodeGenerator : System.IDisposable - { - public QRCodeGenerator() { } - public QRCoder.QRCodeData CreateQrCode(QRCoder.PayloadGenerator.Payload payload) { } - public QRCoder.QRCodeData CreateQrCode(QRCoder.PayloadGenerator.Payload payload, QRCoder.QRCodeGenerator.ECCLevel eccLevel) { } - public QRCoder.QRCodeData CreateQrCode(byte[] binaryData, QRCoder.QRCodeGenerator.ECCLevel eccLevel) { } - public QRCoder.QRCodeData CreateQrCode(string plainText, QRCoder.QRCodeGenerator.ECCLevel eccLevel, bool forceUtf8 = false, bool utf8BOM = false, QRCoder.QRCodeGenerator.EciMode eciMode = 0, int requestedVersion = -1) { } - public void Dispose() { } - public static QRCoder.QRCodeData GenerateMicroQrCode(string plainText, QRCoder.QRCodeGenerator.ECCLevel eccLevel = -1, int requestedVersion = 0) { } - public static QRCoder.QRCodeData GenerateQrCode(QRCoder.PayloadGenerator.Payload payload) { } - public static QRCoder.QRCodeData GenerateQrCode(QRCoder.PayloadGenerator.Payload payload, QRCoder.QRCodeGenerator.ECCLevel eccLevel) { } - public static QRCoder.QRCodeData GenerateQrCode(byte[] binaryData, QRCoder.QRCodeGenerator.ECCLevel eccLevel) { } - public static QRCoder.QRCodeData GenerateQrCode(string plainText, QRCoder.QRCodeGenerator.ECCLevel eccLevel, bool forceUtf8 = false, bool utf8BOM = false, QRCoder.QRCodeGenerator.EciMode eciMode = 0, int requestedVersion = -1) { } - public enum ECCLevel - { - Default = -1, - L = 0, - M = 1, - Q = 2, - H = 3, - } - public enum EciMode - { - Default = 0, - Iso8859_1 = 3, - Iso8859_2 = 4, - Utf8 = 26, - } - } - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - public static class QRCodeHelper - { - public static System.Drawing.Bitmap GetQRCode(string plainText, int pixelsPerModule, System.Drawing.Color darkColor, System.Drawing.Color lightColor, QRCoder.QRCodeGenerator.ECCLevel eccLevel, bool forceUtf8 = false, bool utf8BOM = false, QRCoder.QRCodeGenerator.EciMode eciMode = 0, int requestedVersion = -1, System.Drawing.Bitmap? icon = null, int iconSizePercent = 15, int iconBorderWidth = 0, bool drawQuietZones = true) { } - } - public class SvgQRCode : QRCoder.AbstractQRCode, System.IDisposable - { - public SvgQRCode() { } - public SvgQRCode(QRCoder.QRCodeData data) { } - public string GetGraphic(int pixelsPerModule) { } - public string GetGraphic(System.Drawing.Size viewBox, bool drawQuietZones = true, QRCoder.SvgQRCode.SizingMode sizingMode = 0, QRCoder.SvgQRCode.SvgLogo? logo = null) { } - public string GetGraphic(System.Drawing.Size viewBox, System.Drawing.Color darkColor, System.Drawing.Color lightColor, bool drawQuietZones = true, QRCoder.SvgQRCode.SizingMode sizingMode = 0, QRCoder.SvgQRCode.SvgLogo? logo = null) { } - public string GetGraphic(System.Drawing.Size viewBox, string darkColorHex, string lightColorHex, bool drawQuietZones = true, QRCoder.SvgQRCode.SizingMode sizingMode = 0, QRCoder.SvgQRCode.SvgLogo? logo = null) { } - public string GetGraphic(int pixelsPerModule, System.Drawing.Color darkColor, System.Drawing.Color lightColor, bool drawQuietZones = true, QRCoder.SvgQRCode.SizingMode sizingMode = 0, QRCoder.SvgQRCode.SvgLogo? logo = null) { } - public string GetGraphic(int pixelsPerModule, string darkColorHex, string lightColorHex, bool drawQuietZones = true, QRCoder.SvgQRCode.SizingMode sizingMode = 0, QRCoder.SvgQRCode.SvgLogo? logo = null) { } - public enum SizingMode - { - WidthHeightAttribute = 0, - ViewBoxAttribute = 1, - } - public class SvgLogo - { - public SvgLogo(byte[] iconRasterized, int iconSizePercent = 15, bool fillLogoBackground = true) { } - [System.Runtime.Versioning.SupportedOSPlatform("windows")] - public SvgLogo(System.Drawing.Bitmap iconRasterized, int iconSizePercent = 15, bool fillLogoBackground = true) { } - public SvgLogo(string iconVectorized, int iconSizePercent = 15, bool fillLogoBackground = true, bool iconEmbedded = true) { } - public bool FillLogoBackground() { } - public string GetDataUri() { } - public int GetIconSizePercent() { } - public QRCoder.SvgQRCode.SvgLogo.MediaType GetMediaType() { } - public object GetRawLogo() { } - public bool IsEmbedded() { } - public enum MediaType - { - [QRCoder.Extensions.StringValue("image/png")] - PNG = 0, - [QRCoder.Extensions.StringValue("image/svg+xml")] - SVG = 1, - } - } - } - public static class SvgQRCodeHelper - { - public static string GetQRCode(string plainText, int pixelsPerModule, string darkColorHex, string lightColorHex, QRCoder.QRCodeGenerator.ECCLevel eccLevel, bool forceUtf8 = false, bool utf8BOM = false, QRCoder.QRCodeGenerator.EciMode eciMode = 0, int requestedVersion = -1, bool drawQuietZones = true, QRCoder.SvgQRCode.SizingMode sizingMode = 0, QRCoder.SvgQRCode.SvgLogo? logo = null) { } - } -} -namespace QRCoder.Exceptions -{ - public class DataTooLongException : System.Exception - { - public DataTooLongException(string eccLevel, string encodingMode, int maxSizeByte) { } - public DataTooLongException(string eccLevel, string encodingMode, int version, int maxSizeByte) { } - } -} -namespace QRCoder.Extensions -{ - [System.Obsolete("This class will be removed in a future version of QRCoder.")] - public static class CustomExtensions - { - [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("This method uses reflection to examine the provided enum value.")] - public static string? GetStringValue(this System.Enum value) { } - } - [System.Obsolete("This attribute will be removed in a future version of QRCoder.")] - public class StringValueAttribute : System.Attribute - { - public StringValueAttribute(string value) { } - public string StringValue { get; set; } - } -} diff --git a/QRCoderApiTests/net60/QRCoder.approved.txt b/QRCoderApiTests/net60/QRCoder.approved.txt index 1db2dc0a..d50a8826 100644 --- a/QRCoderApiTests/net60/QRCoder.approved.txt +++ b/QRCoderApiTests/net60/QRCoder.approved.txt @@ -8,6 +8,46 @@ namespace QRCoder public void Dispose() { } public virtual void SetQRCodeData(QRCoder.QRCodeData data) { } } + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + public class ArtQRCode : QRCoder.AbstractQRCode, System.IDisposable + { + public ArtQRCode() { } + public ArtQRCode(QRCoder.QRCodeData data) { } + public System.Drawing.Bitmap GetGraphic(System.Drawing.Bitmap? backgroundImage = null) { } + public System.Drawing.Bitmap GetGraphic(int pixelsPerModule) { } + public System.Drawing.Bitmap GetGraphic(int pixelsPerModule, System.Drawing.Color darkColor, System.Drawing.Color lightColor, System.Drawing.Color backgroundColor, System.Drawing.Bitmap? backgroundImage = null, double pixelSizeFactor = 1, bool drawQuietZones = true, QRCoder.ArtQRCode.QuietZoneStyle quietZoneRenderingStyle = 0, QRCoder.ArtQRCode.BackgroundImageStyle backgroundImageStyle = 1, System.Drawing.Bitmap? finderPatternImage = null) { } + public enum BackgroundImageStyle + { + Fill = 0, + DataAreaOnly = 1, + } + public enum QuietZoneStyle + { + Dotted = 0, + Flat = 1, + } + } + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + public static class ArtQRCodeHelper + { + public static System.Drawing.Bitmap GetQRCode( + string plainText, + int pixelsPerModule, + System.Drawing.Color darkColor, + System.Drawing.Color lightColor, + System.Drawing.Color backgroundColor, + QRCoder.QRCodeGenerator.ECCLevel eccLevel, + bool forceUtf8 = false, + bool utf8BOM = false, + QRCoder.QRCodeGenerator.EciMode eciMode = 0, + int requestedVersion = -1, + System.Drawing.Bitmap? backgroundImage = null, + double pixelSizeFactor = 1, + bool drawQuietZones = true, + QRCoder.ArtQRCode.QuietZoneStyle quietZoneRenderingStyle = 1, + QRCoder.ArtQRCode.BackgroundImageStyle backgroundImageStyle = 1, + System.Drawing.Bitmap? finderPatternImage = null) { } + } public class AsciiQRCode : QRCoder.AbstractQRCode, System.IDisposable { public AsciiQRCode() { } @@ -32,6 +72,8 @@ namespace QRCoder public string GetGraphic(int pixelsPerModule) { } public string GetGraphic(int pixelsPerModule, System.Drawing.Color darkColor, System.Drawing.Color lightColor, bool drawQuietZones = true, QRCoder.Base64QRCode.ImageType imgType = 2) { } public string GetGraphic(int pixelsPerModule, string darkColorHtmlHex, string lightColorHtmlHex, bool drawQuietZones = true, QRCoder.Base64QRCode.ImageType imgType = 2) { } + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + public string GetGraphic(int pixelsPerModule, System.Drawing.Color darkColor, System.Drawing.Color lightColor, System.Drawing.Bitmap icon, int iconSizePercent = 15, int iconBorderWidth = 6, bool drawQuietZones = true, QRCoder.Base64QRCode.ImageType imgType = 2) { } public enum ImageType { [System.Runtime.Versioning.SupportedOSPlatform("windows")] @@ -851,6 +893,16 @@ namespace QRCoder { public static string GetQRCode(string plainText, int pointsPerModule, string darkColorHex, string lightColorHex, QRCoder.QRCodeGenerator.ECCLevel eccLevel, bool forceUtf8 = false, bool utf8BOM = false, QRCoder.QRCodeGenerator.EciMode eciMode = 0, int requestedVersion = -1, bool drawQuietZones = true, bool epsFormat = false) { } } + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + public class QRCode : QRCoder.AbstractQRCode, System.IDisposable + { + public QRCode() { } + public QRCode(QRCoder.QRCodeData data) { } + public System.Drawing.Bitmap GetGraphic(int pixelsPerModule) { } + public System.Drawing.Bitmap GetGraphic(int pixelsPerModule, System.Drawing.Color darkColor, System.Drawing.Color lightColor, bool drawQuietZones = true) { } + public System.Drawing.Bitmap GetGraphic(int pixelsPerModule, string darkColorHtmlHex, string lightColorHtmlHex, bool drawQuietZones = true) { } + public System.Drawing.Bitmap GetGraphic(int pixelsPerModule, System.Drawing.Color darkColor, System.Drawing.Color lightColor, System.Drawing.Bitmap? icon = null, int iconSizePercent = 15, int iconBorderWidth = 0, bool drawQuietZones = true, System.Drawing.Color? iconBackgroundColor = default) { } + } public class QRCodeData : System.IDisposable { public QRCodeData(int version) { } @@ -898,6 +950,11 @@ namespace QRCoder Utf8 = 26, } } + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + public static class QRCodeHelper + { + public static System.Drawing.Bitmap GetQRCode(string plainText, int pixelsPerModule, System.Drawing.Color darkColor, System.Drawing.Color lightColor, QRCoder.QRCodeGenerator.ECCLevel eccLevel, bool forceUtf8 = false, bool utf8BOM = false, QRCoder.QRCodeGenerator.EciMode eciMode = 0, int requestedVersion = -1, System.Drawing.Bitmap? icon = null, int iconSizePercent = 15, int iconBorderWidth = 0, bool drawQuietZones = true) { } + } public class SvgQRCode : QRCoder.AbstractQRCode, System.IDisposable { public SvgQRCode() { } @@ -916,6 +973,8 @@ namespace QRCoder public class SvgLogo { public SvgLogo(byte[] iconRasterized, int iconSizePercent = 15, bool fillLogoBackground = true) { } + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + public SvgLogo(System.Drawing.Bitmap iconRasterized, int iconSizePercent = 15, bool fillLogoBackground = true) { } public SvgLogo(string iconVectorized, int iconSizePercent = 15, bool fillLogoBackground = true, bool iconEmbedded = true) { } public bool FillLogoBackground() { } public string GetDataUri() { } diff --git a/QRCoderTests/QRCoderTests.csproj b/QRCoderTests/QRCoderTests.csproj index bc4aed9a..b09c6e1e 100644 --- a/QRCoderTests/QRCoderTests.csproj +++ b/QRCoderTests/QRCoderTests.csproj @@ -1,7 +1,7 @@  - net462;netcoreapp2.1;netcoreapp3.1;net5.0;net5.0-windows;net6.0;net6.0-windows + net462;netcoreapp2.1;netcoreapp3.1;net5.0-windows;net6.0-windows true true $(DefineConstants);TEST_XAML From 089715215616307da4fd1c6674e0d2ab9585c42e Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Sun, 5 Oct 2025 16:12:34 -0400 Subject: [PATCH 4/5] update workflow --- .github/workflows/wf-build-test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/wf-build-test.yml b/.github/workflows/wf-build-test.yml index c1edb696..09f01c52 100644 --- a/.github/workflows/wf-build-test.yml +++ b/.github/workflows/wf-build-test.yml @@ -46,9 +46,7 @@ jobs: - { name: ".NET Framework 4.6.2", framework: "net462", coverage: false, no-build: true, sdk: "8.0.x" } - { name: ".NET Core 2.1", framework: "netcoreapp2.1", coverage: true, no-build: false, sdk: "2.1.x" } - { name: ".NET Core 3.1", framework: "netcoreapp3.1", coverage: true, no-build: true, sdk: "3.1.x" } - - { name: ".NET 5.0", framework: "net5.0", coverage: true, no-build: true, sdk: "5.0.x" } - { name: ".NET 5.0 Windows", framework: "net5.0-windows", coverage: true, no-build: true, sdk: "5.0.x" } - - { name: ".NET 6.0", framework: "net6.0", coverage: true, no-build: true, sdk: "6.0.x" } - { name: ".NET 6.0 Windows", framework: "net6.0-windows", coverage: true, no-build: true, sdk: "6.0.x" } name: Test ${{ matrix.dotnet-framework.name }} steps: From 9c21b8be96cc02083b9b29f718e711a2245f87d1 Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Sun, 5 Oct 2025 22:59:42 -0400 Subject: [PATCH 5/5] Add build step to CI workflows for solution compilation --- .github/workflows/wf-build-release-ci.yml | 3 +++ .github/workflows/wf-build-test.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/wf-build-release-ci.yml b/.github/workflows/wf-build-release-ci.yml index dc4e7a19..82d3f292 100644 --- a/.github/workflows/wf-build-release-ci.yml +++ b/.github/workflows/wf-build-release-ci.yml @@ -61,6 +61,9 @@ jobs: working-directory: QRCoderTrimAnalysis run: dotnet publish -c Release -o bin/publish + - name: Build solution + run: dotnet build -c Release + - name: Run API approval tests working-directory: QRCoderApiTests run: dotnet test -c Release --nologo diff --git a/.github/workflows/wf-build-test.yml b/.github/workflows/wf-build-test.yml index 75c9d918..5a81bf4a 100644 --- a/.github/workflows/wf-build-test.yml +++ b/.github/workflows/wf-build-test.yml @@ -53,6 +53,9 @@ jobs: working-directory: QRCoderTrimAnalysis run: dotnet publish -c Release -o bin/publish + - name: Build solution + run: dotnet build -c Release + - name: Run API approval tests working-directory: QRCoderApiTests run: dotnet test -c Release --nologo