From c845fb5f2f6e81299fcd4e5ed53b224094432e35 Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Fri, 26 Apr 2024 10:18:18 -0400 Subject: [PATCH 01/20] Add API approvals --- .gitignore | 3 + QRCoder.sln | 18 + QRCoder/ASCIIQRCode.cs | 2 +- QRCoderApiTests/ApiApprovalTests.cs | 80 ++ QRCoderApiTests/QRCoder.Xaml.approved.txt | 18 + QRCoderApiTests/QRCoderApiTests.csproj | 23 + .../QRCoder.approved.txt | 975 +++++++++++++++++ .../net60-windows/QRCoder.approved.txt | 983 ++++++++++++++++++ QRCoderApiTests/net60/QRCoder.approved.txt | 910 ++++++++++++++++ .../netstandard13/QRCoder.approved.txt | 837 +++++++++++++++ 10 files changed, 3848 insertions(+), 1 deletion(-) create mode 100644 QRCoderApiTests/ApiApprovalTests.cs create mode 100644 QRCoderApiTests/QRCoder.Xaml.approved.txt create mode 100644 QRCoderApiTests/QRCoderApiTests.csproj create mode 100644 QRCoderApiTests/net35+net40+net50+net50-windows+netstandard20/QRCoder.approved.txt create mode 100644 QRCoderApiTests/net60-windows/QRCoder.approved.txt create mode 100644 QRCoderApiTests/net60/QRCoder.approved.txt create mode 100644 QRCoderApiTests/netstandard13/QRCoder.approved.txt diff --git a/.gitignore b/.gitignore index 0276e92c..807fbc9e 100644 --- a/.gitignore +++ b/.gitignore @@ -219,3 +219,6 @@ pip-log.txt *.userprefs QRCoder/PortabilityAnalysis.html + +# Unaccepted approval files +*.received.txt diff --git a/QRCoder.sln b/QRCoder.sln index 5e8de931..10bfa14a 100644 --- a/QRCoder.sln +++ b/QRCoder.sln @@ -15,6 +15,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QRCoderTests", "QRCoderTest EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QRCoder.Xaml", "QRCoder.Xaml\QRCoder.Xaml.csproj", "{A7A7E073-2504-4BA2-A63B-87AC34174789}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QRCoderApiTests", "QRCoderApiTests\QRCoderApiTests.csproj", "{5FACE5F6-53C9-4B89-91D4-162677893574}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -119,6 +121,22 @@ Global {A7A7E073-2504-4BA2-A63B-87AC34174789}.Release|x64.Build.0 = Release|Any CPU {A7A7E073-2504-4BA2-A63B-87AC34174789}.Release|x86.ActiveCfg = Release|Any CPU {A7A7E073-2504-4BA2-A63B-87AC34174789}.Release|x86.Build.0 = Release|Any CPU + {5FACE5F6-53C9-4B89-91D4-162677893574}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5FACE5F6-53C9-4B89-91D4-162677893574}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5FACE5F6-53C9-4B89-91D4-162677893574}.Debug|ARM.ActiveCfg = Debug|Any CPU + {5FACE5F6-53C9-4B89-91D4-162677893574}.Debug|ARM.Build.0 = Debug|Any CPU + {5FACE5F6-53C9-4B89-91D4-162677893574}.Debug|x64.ActiveCfg = Debug|Any CPU + {5FACE5F6-53C9-4B89-91D4-162677893574}.Debug|x64.Build.0 = Debug|Any CPU + {5FACE5F6-53C9-4B89-91D4-162677893574}.Debug|x86.ActiveCfg = Debug|Any CPU + {5FACE5F6-53C9-4B89-91D4-162677893574}.Debug|x86.Build.0 = Debug|Any CPU + {5FACE5F6-53C9-4B89-91D4-162677893574}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5FACE5F6-53C9-4B89-91D4-162677893574}.Release|Any CPU.Build.0 = Release|Any CPU + {5FACE5F6-53C9-4B89-91D4-162677893574}.Release|ARM.ActiveCfg = Release|Any CPU + {5FACE5F6-53C9-4B89-91D4-162677893574}.Release|ARM.Build.0 = Release|Any CPU + {5FACE5F6-53C9-4B89-91D4-162677893574}.Release|x64.ActiveCfg = Release|Any CPU + {5FACE5F6-53C9-4B89-91D4-162677893574}.Release|x64.Build.0 = Release|Any CPU + {5FACE5F6-53C9-4B89-91D4-162677893574}.Release|x86.ActiveCfg = Release|Any CPU + {5FACE5F6-53C9-4B89-91D4-162677893574}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/QRCoder/ASCIIQRCode.cs b/QRCoder/ASCIIQRCode.cs index 29cda3e5..41efc6eb 100644 --- a/QRCoder/ASCIIQRCode.cs +++ b/QRCoder/ASCIIQRCode.cs @@ -14,7 +14,7 @@ public AsciiQRCode() { } public AsciiQRCode(QRCodeData data) : base(data) { } - + /// /// Returns a strings that contains the resulting QR code as textual representation. /// diff --git a/QRCoderApiTests/ApiApprovalTests.cs b/QRCoderApiTests/ApiApprovalTests.cs new file mode 100644 index 00000000..08bfb3ce --- /dev/null +++ b/QRCoderApiTests/ApiApprovalTests.cs @@ -0,0 +1,80 @@ +using PublicApiGenerator; +using Shouldly; +using System.Diagnostics; +using System.Reflection; +using System.Xml.Linq; +using Xunit; + +namespace QRCoderApiTests; + +/// +/// See more info about API approval tests here . +/// +public class ApiApprovalTests +{ + [Theory] + [InlineData(typeof(QRCoder.QRCodeData))] + [InlineData(typeof(QRCoder.Xaml.XamlQRCode))] + public void PublicApi(Type type) + { + string baseDir = AppDomain.CurrentDomain.BaseDirectory; + string projectName = type.Assembly.GetName().Name!; + string testDir = Path.Combine(baseDir, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}.."); + string projectDir = Path.Combine(testDir, ".."); + string buildDir = Path.Combine(projectDir, projectName, "bin", "Debug"); + Debug.Assert(Directory.Exists(buildDir), $"Directory '{buildDir}' doesn't exist"); + string csProject = Path.Combine(projectDir, projectName, projectName + ".csproj"); + var project = XDocument.Load(csProject); + string[] tfms = project.Descendants("TargetFrameworks").Union(project.Descendants("TargetFramework")).First().Value.Split(";", StringSplitOptions.RemoveEmptyEntries); + + // There may be old stuff from earlier builds like net45, netcoreapp3.0, etc. so filter it out + string[] actualTfmDirs = Directory.GetDirectories(buildDir).Where(dir => tfms.Any(tfm => dir.EndsWith(tfm))).ToArray(); + Debug.Assert(actualTfmDirs.Length > 0, $"Directory '{buildDir}' doesn't contain subdirectories matching {string.Join(";", tfms)}"); + + (string tfm, string content)[] publicApi = actualTfmDirs.Select(tfmDir => (new DirectoryInfo(tfmDir).Name.Replace(".", ""), Assembly.LoadFile(Path.Combine(tfmDir, projectName + ".dll")).GeneratePublicApi(new ApiGeneratorOptions + { + IncludeAssemblyAttributes = false, + //AllowNamespacePrefixes = new[] { "Microsoft.Extensions.DependencyInjection" }, + ExcludeAttributes = new[] { "System.Diagnostics.DebuggerDisplayAttribute", "System.Diagnostics.CodeAnalysis.AllowNullAttribute" } + }) + Environment.NewLine)).ToArray(); + + if (publicApi.DistinctBy(item => item.content).Count() == 1) + { + AutoApproveOrFail(publicApi[0].content, ""); + } + else + { + foreach (var item in publicApi.ToLookup(item => item.content)) + { + AutoApproveOrFail(item.Key, string.Join("+", item.Select(x => x.tfm).OrderBy(x => x))); + } + } + + // Approval test should (re)generate approved.txt files locally if needed. + // Approval test should fail on CI. + // https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables + void AutoApproveOrFail(string publicApi, string folder) + { + string file = null!; + + try + { + publicApi.ShouldMatchApproved(options => options.SubFolder(folder).NoDiff().WithFilenameGenerator((testMethodInfo, discriminator, fileType, fileExtension) => file = $"{type.Assembly.GetName().Name}.{fileType}.{fileExtension}")); + } + catch (ShouldMatchApprovedException) when (Environment.GetEnvironmentVariable("CI") == null) + { + string? received = Path.Combine(testDir, folder, file); + string? approved = received.Replace(".received.txt", ".approved.txt"); + if (File.Exists(received) && File.Exists(approved)) + { + File.Copy(received, approved, overwrite: true); + File.Delete(received); + } + else + { + throw; + } + } + } + } +} \ No newline at end of file diff --git a/QRCoderApiTests/QRCoder.Xaml.approved.txt b/QRCoderApiTests/QRCoder.Xaml.approved.txt new file mode 100644 index 00000000..2b2dcfb8 --- /dev/null +++ b/QRCoderApiTests/QRCoder.Xaml.approved.txt @@ -0,0 +1,18 @@ +namespace QRCoder.Xaml +{ + public class XamlQRCode : QRCoder.AbstractQRCode, System.IDisposable + { + public XamlQRCode() { } + public XamlQRCode(QRCoder.QRCodeData data) { } + public System.Windows.Media.DrawingImage GetGraphic(int pixelsPerModule) { } + public System.Windows.Media.DrawingImage GetGraphic(int pixelsPerModule, bool drawQuietZones) { } + public System.Windows.Media.DrawingImage GetGraphic(System.Windows.Size viewBox, bool drawQuietZones = true) { } + public System.Windows.Media.DrawingImage GetGraphic(int pixelsPerModule, string darkColorHex, string lightColorHex, bool drawQuietZones = true) { } + public System.Windows.Media.DrawingImage GetGraphic(System.Windows.Size viewBox, System.Windows.Media.Brush darkBrush, System.Windows.Media.Brush lightBrush, bool drawQuietZones = true) { } + public double GetUnitsPerModule(System.Windows.Size viewBox, bool drawQuietZones = true) { } + } + public static class XamlQRCodeHelper + { + public static System.Windows.Media.DrawingImage 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) { } + } +} diff --git a/QRCoderApiTests/QRCoderApiTests.csproj b/QRCoderApiTests/QRCoderApiTests.csproj new file mode 100644 index 00000000..e026a674 --- /dev/null +++ b/QRCoderApiTests/QRCoderApiTests.csproj @@ -0,0 +1,23 @@ + + + + net8.0 + enable + enable + true + + + + + + + + + + + + + + + + diff --git a/QRCoderApiTests/net35+net40+net50+net50-windows+netstandard20/QRCoder.approved.txt b/QRCoderApiTests/net35+net40+net50+net50-windows+netstandard20/QRCoder.approved.txt new file mode 100644 index 00000000..37068cf1 --- /dev/null +++ b/QRCoderApiTests/net35+net40+net50+net50-windows+netstandard20/QRCoder.approved.txt @@ -0,0 +1,975 @@ +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) { } + } + 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, + } + } + 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 void Testme() { } + } + 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) { } + 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 + { + Gif = 0, + 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 override string ToString() { } + public enum AddressOrder + { + Default = 0, + Reversed = 1, + } + 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 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 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 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) { } + } + 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(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 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 + { + L = 0, + M = 1, + Q = 2, + H = 3, + } + public enum EciMode + { + Default = 0, + Iso8859_1 = 3, + Iso8859_2 = 4, + Utf8 = 26, + } + } + 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) { } + 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 +{ + public static class CustomExtensions + { + public static string GetStringValue(this System.Enum value) { } + } + public class StringValueAttribute : System.Attribute + { + public StringValueAttribute(string value) { } + public string StringValue { get; set; } + } +} diff --git a/QRCoderApiTests/net60-windows/QRCoder.approved.txt b/QRCoderApiTests/net60-windows/QRCoder.approved.txt new file mode 100644 index 00000000..1e801927 --- /dev/null +++ b/QRCoderApiTests/net60-windows/QRCoder.approved.txt @@ -0,0 +1,983 @@ +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 void Testme() { } + } + 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 override string ToString() { } + public enum AddressOrder + { + Default = 0, + Reversed = 1, + } + 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 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 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, + } + } + } + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + 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) { } + } + [System.Runtime.Versioning.SupportedOSPlatform("windows")] + 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 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 System.Collections.Generic.List ModuleMatrix { get; set; } + public int Version { get; } + public void Dispose() { } + public byte[] GetRawData(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 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 + { + 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 +{ + public static class CustomExtensions + { + public static string GetStringValue(this System.Enum value) { } + } + 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 new file mode 100644 index 00000000..09af28bf --- /dev/null +++ b/QRCoderApiTests/net60/QRCoder.approved.txt @@ -0,0 +1,910 @@ +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) { } + } + 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 void Testme() { } + } + 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) { } + 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 override string ToString() { } + public enum AddressOrder + { + Default = 0, + Reversed = 1, + } + 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 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 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 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 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) { } + } + public class QRCodeData : System.IDisposable + { + public QRCodeData(int version) { } + public QRCodeData(byte[] rawData, 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 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 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 + { + L = 0, + M = 1, + Q = 2, + H = 3, + } + public enum EciMode + { + Default = 0, + Iso8859_1 = 3, + Iso8859_2 = 4, + Utf8 = 26, + } + } + 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) { } + 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 +{ + public static class CustomExtensions + { + public static string GetStringValue(this System.Enum value) { } + } + public class StringValueAttribute : System.Attribute + { + public StringValueAttribute(string value) { } + public string StringValue { get; set; } + } +} diff --git a/QRCoderApiTests/netstandard13/QRCoder.approved.txt b/QRCoderApiTests/netstandard13/QRCoder.approved.txt new file mode 100644 index 00000000..26eda757 --- /dev/null +++ b/QRCoderApiTests/netstandard13/QRCoder.approved.txt @@ -0,0 +1,837 @@ +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) { } + } + 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 void Testme() { } + } + 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 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 override string ToString() { } + public enum AddressOrder + { + Default = 0, + Reversed = 1, + } + 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 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 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 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 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 QRCodeData : System.IDisposable + { + public QRCodeData(int version) { } + public QRCodeData(byte[] rawData, 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 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 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 + { + L = 0, + M = 1, + Q = 2, + H = 3, + } + public enum EciMode + { + Default = 0, + Iso8859_1 = 3, + Iso8859_2 = 4, + Utf8 = 26, + } + } +} +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 +{ + public static class CustomExtensions + { + public static string GetStringValue(this System.Enum value) { } + } + public class StringValueAttribute : System.Attribute + { + public StringValueAttribute(string value) { } + public string StringValue { get; set; } + } +} From 42d53c192467a9661df1442b861d87a6e56d0bee Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Fri, 26 Apr 2024 10:19:12 -0400 Subject: [PATCH 02/20] Update QRCoder/ASCIIQRCode.cs --- QRCoder/ASCIIQRCode.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/QRCoder/ASCIIQRCode.cs b/QRCoder/ASCIIQRCode.cs index 41efc6eb..29cda3e5 100644 --- a/QRCoder/ASCIIQRCode.cs +++ b/QRCoder/ASCIIQRCode.cs @@ -14,7 +14,7 @@ public AsciiQRCode() { } public AsciiQRCode(QRCodeData data) : base(data) { } - + /// /// Returns a strings that contains the resulting QR code as textual representation. /// From 1e5dec0571a2974e977fdfd0dcf7e1ff22e3e7e0 Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Fri, 26 Apr 2024 10:19:45 -0400 Subject: [PATCH 03/20] Update newline --- QRCoderApiTests/ApiApprovalTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/QRCoderApiTests/ApiApprovalTests.cs b/QRCoderApiTests/ApiApprovalTests.cs index 08bfb3ce..ef3c48be 100644 --- a/QRCoderApiTests/ApiApprovalTests.cs +++ b/QRCoderApiTests/ApiApprovalTests.cs @@ -77,4 +77,4 @@ void AutoApproveOrFail(string publicApi, string folder) } } } -} \ No newline at end of file +} From a4e88054a6ac554c1612d58fb2c01b994b77cce3 Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Fri, 26 Apr 2024 10:20:52 -0400 Subject: [PATCH 04/20] Fix indents --- QRCoderApiTests/QRCoderApiTests.csproj | 34 +++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/QRCoderApiTests/QRCoderApiTests.csproj b/QRCoderApiTests/QRCoderApiTests.csproj index e026a674..6efd917e 100644 --- a/QRCoderApiTests/QRCoderApiTests.csproj +++ b/QRCoderApiTests/QRCoderApiTests.csproj @@ -1,23 +1,23 @@  - - net8.0 - enable - enable - true - + + net8.0 + enable + enable + true + - - - - + + + + - - - - - - - + + + + + + + From 0cad5cf6615ad84bd3df7f8a934780690482266f Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Fri, 26 Apr 2024 10:45:13 -0400 Subject: [PATCH 05/20] Update QRCoderApiTests/QRCoderApiTests.csproj --- QRCoderApiTests/QRCoderApiTests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/QRCoderApiTests/QRCoderApiTests.csproj b/QRCoderApiTests/QRCoderApiTests.csproj index 6efd917e..2f45bfeb 100644 --- a/QRCoderApiTests/QRCoderApiTests.csproj +++ b/QRCoderApiTests/QRCoderApiTests.csproj @@ -1,7 +1,7 @@  - net8.0 + net6.0 enable enable true From cdac65fd5e829567456b28dad818421453db7c70 Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Fri, 26 Apr 2024 10:52:32 -0400 Subject: [PATCH 06/20] Update for .NET 6 --- QRCoderApiTests/ApiApprovalTests.cs | 3 +++ QRCoderApiTests/QRCoderApiTests.csproj | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/QRCoderApiTests/ApiApprovalTests.cs b/QRCoderApiTests/ApiApprovalTests.cs index ef3c48be..f59ab3dc 100644 --- a/QRCoderApiTests/ApiApprovalTests.cs +++ b/QRCoderApiTests/ApiApprovalTests.cs @@ -1,6 +1,9 @@ using PublicApiGenerator; using Shouldly; +using System; using System.Diagnostics; +using System.IO; +using System.Linq; using System.Reflection; using System.Xml.Linq; using Xunit; diff --git a/QRCoderApiTests/QRCoderApiTests.csproj b/QRCoderApiTests/QRCoderApiTests.csproj index 2f45bfeb..c39a6ec2 100644 --- a/QRCoderApiTests/QRCoderApiTests.csproj +++ b/QRCoderApiTests/QRCoderApiTests.csproj @@ -2,7 +2,6 @@ net6.0 - enable enable true From 5a8f85222b97a56e4b8ecb5cb85267eea897dda4 Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Fri, 26 Apr 2024 11:03:59 -0400 Subject: [PATCH 07/20] Include license --- QRCoderApiTests/ApiApprovalTests.cs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/QRCoderApiTests/ApiApprovalTests.cs b/QRCoderApiTests/ApiApprovalTests.cs index f59ab3dc..f57c5484 100644 --- a/QRCoderApiTests/ApiApprovalTests.cs +++ b/QRCoderApiTests/ApiApprovalTests.cs @@ -10,6 +10,34 @@ namespace QRCoderApiTests; +/********************************************* + * + * This file copied from GraphQL.NET on 4/26/2024 + * https://github.com/graphql-dotnet/graphql-dotnet/blob/dce3a8d9335eb2ff0674a1e48af01fdd6b942119/src/GraphQL.ApiTests/ApiApprovalTests.cs + * + * Unmodified portions of this file are subject to the following license: + * https://github.com/graphql-dotnet/graphql-dotnet/blob/dce3a8d9335eb2ff0674a1e48af01fdd6b942119/LICENSE.md + * + * The MIT License (MIT) + * + * Copyright (c) 2015-2023 Joseph T. McBride, Ivan Maximov, Shane Krueger, et al. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and + * associated documentation files (the "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the + * following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED + * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + * + *********************************************/ + /// /// See more info about API approval tests here . /// From 3f1fdf00d93aac4d470ea491e84603bc0c5b6dc5 Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Fri, 26 Apr 2024 11:06:25 -0400 Subject: [PATCH 08/20] Remove file-scoped namespace --- QRCoderApiTests/ApiApprovalTests.cs | 111 ++++++++++++++-------------- 1 file changed, 56 insertions(+), 55 deletions(-) diff --git a/QRCoderApiTests/ApiApprovalTests.cs b/QRCoderApiTests/ApiApprovalTests.cs index f57c5484..2c4b7452 100644 --- a/QRCoderApiTests/ApiApprovalTests.cs +++ b/QRCoderApiTests/ApiApprovalTests.cs @@ -8,8 +8,6 @@ using System.Xml.Linq; using Xunit; -namespace QRCoderApiTests; - /********************************************* * * This file copied from GraphQL.NET on 4/26/2024 @@ -38,72 +36,75 @@ namespace QRCoderApiTests; * *********************************************/ -/// -/// See more info about API approval tests here . -/// -public class ApiApprovalTests +namespace QRCoderApiTests { - [Theory] - [InlineData(typeof(QRCoder.QRCodeData))] - [InlineData(typeof(QRCoder.Xaml.XamlQRCode))] - public void PublicApi(Type type) + /// + /// See more info about API approval tests here . + /// + public class ApiApprovalTests { - string baseDir = AppDomain.CurrentDomain.BaseDirectory; - string projectName = type.Assembly.GetName().Name!; - string testDir = Path.Combine(baseDir, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}.."); - string projectDir = Path.Combine(testDir, ".."); - string buildDir = Path.Combine(projectDir, projectName, "bin", "Debug"); - Debug.Assert(Directory.Exists(buildDir), $"Directory '{buildDir}' doesn't exist"); - string csProject = Path.Combine(projectDir, projectName, projectName + ".csproj"); - var project = XDocument.Load(csProject); - string[] tfms = project.Descendants("TargetFrameworks").Union(project.Descendants("TargetFramework")).First().Value.Split(";", StringSplitOptions.RemoveEmptyEntries); + [Theory] + [InlineData(typeof(QRCoder.QRCodeData))] + [InlineData(typeof(QRCoder.Xaml.XamlQRCode))] + public void PublicApi(Type type) + { + string baseDir = AppDomain.CurrentDomain.BaseDirectory; + string projectName = type.Assembly.GetName().Name!; + string testDir = Path.Combine(baseDir, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}.."); + string projectDir = Path.Combine(testDir, ".."); + string buildDir = Path.Combine(projectDir, projectName, "bin", "Debug"); + Debug.Assert(Directory.Exists(buildDir), $"Directory '{buildDir}' doesn't exist"); + string csProject = Path.Combine(projectDir, projectName, projectName + ".csproj"); + var project = XDocument.Load(csProject); + string[] tfms = project.Descendants("TargetFrameworks").Union(project.Descendants("TargetFramework")).First().Value.Split(";", StringSplitOptions.RemoveEmptyEntries); - // There may be old stuff from earlier builds like net45, netcoreapp3.0, etc. so filter it out - string[] actualTfmDirs = Directory.GetDirectories(buildDir).Where(dir => tfms.Any(tfm => dir.EndsWith(tfm))).ToArray(); - Debug.Assert(actualTfmDirs.Length > 0, $"Directory '{buildDir}' doesn't contain subdirectories matching {string.Join(";", tfms)}"); + // There may be old stuff from earlier builds like net45, netcoreapp3.0, etc. so filter it out + string[] actualTfmDirs = Directory.GetDirectories(buildDir).Where(dir => tfms.Any(tfm => dir.EndsWith(tfm))).ToArray(); + Debug.Assert(actualTfmDirs.Length > 0, $"Directory '{buildDir}' doesn't contain subdirectories matching {string.Join(";", tfms)}"); - (string tfm, string content)[] publicApi = actualTfmDirs.Select(tfmDir => (new DirectoryInfo(tfmDir).Name.Replace(".", ""), Assembly.LoadFile(Path.Combine(tfmDir, projectName + ".dll")).GeneratePublicApi(new ApiGeneratorOptions - { - IncludeAssemblyAttributes = false, - //AllowNamespacePrefixes = new[] { "Microsoft.Extensions.DependencyInjection" }, - ExcludeAttributes = new[] { "System.Diagnostics.DebuggerDisplayAttribute", "System.Diagnostics.CodeAnalysis.AllowNullAttribute" } - }) + Environment.NewLine)).ToArray(); + (string tfm, string content)[] publicApi = actualTfmDirs.Select(tfmDir => (new DirectoryInfo(tfmDir).Name.Replace(".", ""), Assembly.LoadFile(Path.Combine(tfmDir, projectName + ".dll")).GeneratePublicApi(new ApiGeneratorOptions + { + IncludeAssemblyAttributes = false, + //AllowNamespacePrefixes = new[] { "Microsoft.Extensions.DependencyInjection" }, + ExcludeAttributes = new[] { "System.Diagnostics.DebuggerDisplayAttribute", "System.Diagnostics.CodeAnalysis.AllowNullAttribute" } + }) + Environment.NewLine)).ToArray(); - if (publicApi.DistinctBy(item => item.content).Count() == 1) - { - AutoApproveOrFail(publicApi[0].content, ""); - } - else - { - foreach (var item in publicApi.ToLookup(item => item.content)) + if (publicApi.DistinctBy(item => item.content).Count() == 1) { - AutoApproveOrFail(item.Key, string.Join("+", item.Select(x => x.tfm).OrderBy(x => x))); + AutoApproveOrFail(publicApi[0].content, ""); } - } - - // Approval test should (re)generate approved.txt files locally if needed. - // Approval test should fail on CI. - // https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables - void AutoApproveOrFail(string publicApi, string folder) - { - string file = null!; - - try + else { - publicApi.ShouldMatchApproved(options => options.SubFolder(folder).NoDiff().WithFilenameGenerator((testMethodInfo, discriminator, fileType, fileExtension) => file = $"{type.Assembly.GetName().Name}.{fileType}.{fileExtension}")); + foreach (var item in publicApi.ToLookup(item => item.content)) + { + AutoApproveOrFail(item.Key, string.Join("+", item.Select(x => x.tfm).OrderBy(x => x))); + } } - catch (ShouldMatchApprovedException) when (Environment.GetEnvironmentVariable("CI") == null) + + // Approval test should (re)generate approved.txt files locally if needed. + // Approval test should fail on CI. + // https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables + void AutoApproveOrFail(string publicApi, string folder) { - string? received = Path.Combine(testDir, folder, file); - string? approved = received.Replace(".received.txt", ".approved.txt"); - if (File.Exists(received) && File.Exists(approved)) + string file = null!; + + try { - File.Copy(received, approved, overwrite: true); - File.Delete(received); + publicApi.ShouldMatchApproved(options => options.SubFolder(folder).NoDiff().WithFilenameGenerator((testMethodInfo, discriminator, fileType, fileExtension) => file = $"{type.Assembly.GetName().Name}.{fileType}.{fileExtension}")); } - else + catch (ShouldMatchApprovedException) when (Environment.GetEnvironmentVariable("CI") == null) { - throw; + string? received = Path.Combine(testDir, folder, file); + string? approved = received.Replace(".received.txt", ".approved.txt"); + if (File.Exists(received) && File.Exists(approved)) + { + File.Copy(received, approved, overwrite: true); + File.Delete(received); + } + else + { + throw; + } } } } From 8bbd59a65472f1c45a2121c5180bfce63fb00224 Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Fri, 26 Apr 2024 11:21:19 -0400 Subject: [PATCH 09/20] Update workflow --- .github/workflows/wf-build-test.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wf-build-test.yml b/.github/workflows/wf-build-test.yml index 7947f200..d2891b82 100644 --- a/.github/workflows/wf-build-test.yml +++ b/.github/workflows/wf-build-test.yml @@ -60,29 +60,41 @@ jobs: 6.0.x - name: Run test .NET 3.5 + working-directory: QRCoderTests run: dotnet test -c Release -f net35 --nologo --no-build # No coverage for NET3.5 because of bug in combination with Coverlet+Stronh naming - name: Run test .NET 4.52 + working-directory: QRCoderTests run: dotnet test -c Release -f net452 --nologo --no-build # No coverage for NET4.5 because of bug in combination with Coverlet+Strong naming - name: Run test .NET Core 1.1 - run: dotnet test -c Release -f netcoreapp1.1 --nologo # No coverage for .NETCORE 1.1 because Coverlet doesn't support it https://github.com/coverlet-coverage/coverlet/issues/466 + working-directory: QRCoderTests + run: dotnet test -c Release -f netcoreapp1.1 --nologo --no-build # No coverage for .NETCORE 1.1 because Coverlet doesn't support it https://github.com/coverlet-coverage/coverlet/issues/466 - name: Run test .NET Core 2.0 - run: dotnet test -c Release -f netcoreapp2.0 --nologo /p:CollectCoverage=true /p:CoverletOutputFormat=opencover + working-directory: QRCoderTests + run: dotnet test -c Release -f netcoreapp2.0 --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover - name: Run test .NET 5.0 + working-directory: QRCoderTests run: dotnet test -c Release -f net5.0 --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover - name: Run test .NET 5.0 Windows + working-directory: QRCoderTests run: dotnet test -c Release -f net5.0-windows --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover - name: Run test .NET 6.0 + working-directory: QRCoderTests run: dotnet test -c Release -f net6.0 --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover - name: Run test .NET 6.0 Windows + working-directory: QRCoderTests run: dotnet test -c Release -f net6.0-windows --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover + - name: Run API approval tests + working-directory: QRCoderApiTests + run: dotnet test -c Release -f net6.0 --nologo --no-build + clean: needs: [build, test] if: always() From 95c72e6cbb118c14a16c85eddf52989331102ec9 Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Fri, 26 Apr 2024 11:30:58 -0400 Subject: [PATCH 10/20] Update --- QRCoderTests/QRCoderTests - Backup.csproj | 31 ----------------------- 1 file changed, 31 deletions(-) delete mode 100644 QRCoderTests/QRCoderTests - Backup.csproj diff --git a/QRCoderTests/QRCoderTests - Backup.csproj b/QRCoderTests/QRCoderTests - Backup.csproj deleted file mode 100644 index 03c3030e..00000000 --- a/QRCoderTests/QRCoderTests - Backup.csproj +++ /dev/null @@ -1,31 +0,0 @@ - - - net35;net452;netcoreapp1.1;netcoreapp2.0 - false - true - - - - - - - - - - - - - - - - - - - - Always - - - - $(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\Framework\.NETFramework\v3.5\Profile\Client - - \ No newline at end of file From 56eacaee0c4d22cc5ea9afdcb31f3afad9877f3b Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Fri, 26 Apr 2024 11:39:07 -0400 Subject: [PATCH 11/20] Revert no-build --- .github/workflows/wf-build-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wf-build-test.yml b/.github/workflows/wf-build-test.yml index d2891b82..3b6ae9b2 100644 --- a/.github/workflows/wf-build-test.yml +++ b/.github/workflows/wf-build-test.yml @@ -69,11 +69,11 @@ jobs: - name: Run test .NET Core 1.1 working-directory: QRCoderTests - run: dotnet test -c Release -f netcoreapp1.1 --nologo --no-build # No coverage for .NETCORE 1.1 because Coverlet doesn't support it https://github.com/coverlet-coverage/coverlet/issues/466 + run: dotnet test -c Release -f netcoreapp1.1 --nologo # No coverage for .NETCORE 1.1 because Coverlet doesn't support it https://github.com/coverlet-coverage/coverlet/issues/466 - name: Run test .NET Core 2.0 working-directory: QRCoderTests - run: dotnet test -c Release -f netcoreapp2.0 --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover + run: dotnet test -c Release -f netcoreapp2.0 --nologo /p:CollectCoverage=true /p:CoverletOutputFormat=opencover - name: Run test .NET 5.0 working-directory: QRCoderTests From 109989c9081f88184fa5787ace86c72212977a6a Mon Sep 17 00:00:00 2001 From: Shane Krueger Date: Fri, 26 Apr 2024 12:42:03 -0400 Subject: [PATCH 12/20] Update QRCoderApiTests/ApiApprovalTests.cs --- QRCoderApiTests/ApiApprovalTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/QRCoderApiTests/ApiApprovalTests.cs b/QRCoderApiTests/ApiApprovalTests.cs index 2c4b7452..b1f038ae 100644 --- a/QRCoderApiTests/ApiApprovalTests.cs +++ b/QRCoderApiTests/ApiApprovalTests.cs @@ -52,7 +52,7 @@ public void PublicApi(Type type) string projectName = type.Assembly.GetName().Name!; string testDir = Path.Combine(baseDir, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}.."); string projectDir = Path.Combine(testDir, ".."); - string buildDir = Path.Combine(projectDir, projectName, "bin", "Debug"); + string buildDir = Path.Combine(projectDir, projectName, "bin", "Release"); Debug.Assert(Directory.Exists(buildDir), $"Directory '{buildDir}' doesn't exist"); string csProject = Path.Combine(projectDir, projectName, projectName + ".csproj"); var project = XDocument.Load(csProject); From e12a69592b8ee7abff411a414becad7e4e855f7f Mon Sep 17 00:00:00 2001 From: Shane32 Date: Fri, 26 Apr 2024 13:31:36 -0400 Subject: [PATCH 13/20] Fix ApiApprovalTests to run in debug or release --- QRCoderApiTests/ApiApprovalTests.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/QRCoderApiTests/ApiApprovalTests.cs b/QRCoderApiTests/ApiApprovalTests.cs index b1f038ae..b64b7836 100644 --- a/QRCoderApiTests/ApiApprovalTests.cs +++ b/QRCoderApiTests/ApiApprovalTests.cs @@ -52,7 +52,12 @@ public void PublicApi(Type type) string projectName = type.Assembly.GetName().Name!; string testDir = Path.Combine(baseDir, $"..{Path.DirectorySeparatorChar}..{Path.DirectorySeparatorChar}.."); string projectDir = Path.Combine(testDir, ".."); - string buildDir = Path.Combine(projectDir, projectName, "bin", "Release"); + string buildDir = Path.Combine(projectDir, projectName, "bin", +#if DEBUG + "Debug"); +#else + "Release"); +#endif Debug.Assert(Directory.Exists(buildDir), $"Directory '{buildDir}' doesn't exist"); string csProject = Path.Combine(projectDir, projectName, projectName + ".csproj"); var project = XDocument.Load(csProject); From d0852a587226ea021bb9a79114ea82693588456f Mon Sep 17 00:00:00 2001 From: Shane32 Date: Fri, 26 Apr 2024 13:32:09 -0400 Subject: [PATCH 14/20] Fix api approvals to eliminate sample 'testme' method --- .../QRCoder.approved.txt | 1 - QRCoderApiTests/net60-windows/QRCoder.approved.txt | 1 - QRCoderApiTests/net60/QRCoder.approved.txt | 1 - QRCoderApiTests/netstandard13/QRCoder.approved.txt | 1 - 4 files changed, 4 deletions(-) diff --git a/QRCoderApiTests/net35+net40+net50+net50-windows+netstandard20/QRCoder.approved.txt b/QRCoderApiTests/net35+net40+net50+net50-windows+netstandard20/QRCoder.approved.txt index 37068cf1..0573589b 100644 --- a/QRCoderApiTests/net35+net40+net50+net50-windows+netstandard20/QRCoder.approved.txt +++ b/QRCoderApiTests/net35+net40+net50+net50-windows+netstandard20/QRCoder.approved.txt @@ -55,7 +55,6 @@ namespace QRCoder public string GetGraphicSmall(bool drawQuietZones = true, bool invert = false, string endOfLine = " ") { } public string[] GetLineByLineGraphic(int repeatPerModule, string darkColorString = "██", string whiteSpaceString = " ", bool drawQuietZones = true) { } - public void Testme() { } } public static class AsciiQRCodeHelper { diff --git a/QRCoderApiTests/net60-windows/QRCoder.approved.txt b/QRCoderApiTests/net60-windows/QRCoder.approved.txt index 1e801927..63aabe9e 100644 --- a/QRCoderApiTests/net60-windows/QRCoder.approved.txt +++ b/QRCoderApiTests/net60-windows/QRCoder.approved.txt @@ -57,7 +57,6 @@ namespace QRCoder public string GetGraphicSmall(bool drawQuietZones = true, bool invert = false, string endOfLine = " ") { } public string[] GetLineByLineGraphic(int repeatPerModule, string darkColorString = "██", string whiteSpaceString = " ", bool drawQuietZones = true) { } - public void Testme() { } } public static class AsciiQRCodeHelper { diff --git a/QRCoderApiTests/net60/QRCoder.approved.txt b/QRCoderApiTests/net60/QRCoder.approved.txt index 09af28bf..e9d6a7aa 100644 --- a/QRCoderApiTests/net60/QRCoder.approved.txt +++ b/QRCoderApiTests/net60/QRCoder.approved.txt @@ -17,7 +17,6 @@ namespace QRCoder public string GetGraphicSmall(bool drawQuietZones = true, bool invert = false, string endOfLine = " ") { } public string[] GetLineByLineGraphic(int repeatPerModule, string darkColorString = "██", string whiteSpaceString = " ", bool drawQuietZones = true) { } - public void Testme() { } } public static class AsciiQRCodeHelper { diff --git a/QRCoderApiTests/netstandard13/QRCoder.approved.txt b/QRCoderApiTests/netstandard13/QRCoder.approved.txt index 26eda757..bef4cb20 100644 --- a/QRCoderApiTests/netstandard13/QRCoder.approved.txt +++ b/QRCoderApiTests/netstandard13/QRCoder.approved.txt @@ -17,7 +17,6 @@ namespace QRCoder public string GetGraphicSmall(bool drawQuietZones = true, bool invert = false, string endOfLine = " ") { } public string[] GetLineByLineGraphic(int repeatPerModule, string darkColorString = "██", string whiteSpaceString = " ", bool drawQuietZones = true) { } - public void Testme() { } } public static class AsciiQRCodeHelper { From d0354bec91e9976d606b0cd532c70021d4021f04 Mon Sep 17 00:00:00 2001 From: Shane32 Date: Fri, 26 Apr 2024 23:52:47 -0400 Subject: [PATCH 15/20] Manually fix api approvals --- QRCoderApiTests/net60-windows/QRCoder.approved.txt | 2 -- QRCoderApiTests/net60/QRCoder.approved.txt | 2 -- 2 files changed, 4 deletions(-) diff --git a/QRCoderApiTests/net60-windows/QRCoder.approved.txt b/QRCoderApiTests/net60-windows/QRCoder.approved.txt index 63aabe9e..797810b6 100644 --- a/QRCoderApiTests/net60-windows/QRCoder.approved.txt +++ b/QRCoderApiTests/net60-windows/QRCoder.approved.txt @@ -76,9 +76,7 @@ namespace QRCoder 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, } diff --git a/QRCoderApiTests/net60/QRCoder.approved.txt b/QRCoderApiTests/net60/QRCoder.approved.txt index e9d6a7aa..c19a6e02 100644 --- a/QRCoderApiTests/net60/QRCoder.approved.txt +++ b/QRCoderApiTests/net60/QRCoder.approved.txt @@ -34,9 +34,7 @@ namespace QRCoder public string GetGraphic(int pixelsPerModule, string darkColorHtmlHex, string lightColorHtmlHex, 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, } From c63df189c3d5803e16a78698b3653ffb0bfb4a1b Mon Sep 17 00:00:00 2001 From: Shane32 Date: Sat, 27 Apr 2024 00:21:40 -0400 Subject: [PATCH 16/20] Updates to test workflow --- .github/workflows/wf-build-test.yml | 14 ++++---------- QRCoderApiTests/QRCoderApiTests.csproj | 2 +- QRCoderApiTests/net60-windows/QRCoder.approved.txt | 2 ++ QRCoderApiTests/net60/QRCoder.approved.txt | 2 ++ QRCoderTests/QRCoderTests.csproj | 1 + 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/wf-build-test.yml b/.github/workflows/wf-build-test.yml index 3b6ae9b2..b5dac4b0 100644 --- a/.github/workflows/wf-build-test.yml +++ b/.github/workflows/wf-build-test.yml @@ -20,19 +20,13 @@ jobs: 1.0.x 2.0.x 5.0.x - 6.0.x - - - name: Setup MSBuild Path - uses: microsoft/setup-msbuild@v1 - - - name: Setup NuGet - uses: NuGet/setup-nuget@v2 - + 6.0.x + - name: Restore NuGet Packages - run: nuget restore QRCoder.sln + run: dotnet restore - name: Build library - run: msbuild QRCoder.sln /p:Configuration=Release /p:NoWarn="1182" /p:NoWarn="1701" /nr:false /t:Rebuild + run: dotnet build -c Release --no-restore - name: Upload artifacts uses: actions/upload-artifact@v4 diff --git a/QRCoderApiTests/QRCoderApiTests.csproj b/QRCoderApiTests/QRCoderApiTests.csproj index c39a6ec2..6214ca37 100644 --- a/QRCoderApiTests/QRCoderApiTests.csproj +++ b/QRCoderApiTests/QRCoderApiTests.csproj @@ -1,7 +1,7 @@  - net6.0 + net6.0-windows enable true diff --git a/QRCoderApiTests/net60-windows/QRCoder.approved.txt b/QRCoderApiTests/net60-windows/QRCoder.approved.txt index 797810b6..63aabe9e 100644 --- a/QRCoderApiTests/net60-windows/QRCoder.approved.txt +++ b/QRCoderApiTests/net60-windows/QRCoder.approved.txt @@ -76,7 +76,9 @@ namespace QRCoder 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, } diff --git a/QRCoderApiTests/net60/QRCoder.approved.txt b/QRCoderApiTests/net60/QRCoder.approved.txt index c19a6e02..e9d6a7aa 100644 --- a/QRCoderApiTests/net60/QRCoder.approved.txt +++ b/QRCoderApiTests/net60/QRCoder.approved.txt @@ -34,7 +34,9 @@ namespace QRCoder public string GetGraphic(int pixelsPerModule, string darkColorHtmlHex, string lightColorHtmlHex, 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, } diff --git a/QRCoderTests/QRCoderTests.csproj b/QRCoderTests/QRCoderTests.csproj index e5c01ba9..79477892 100644 --- a/QRCoderTests/QRCoderTests.csproj +++ b/QRCoderTests/QRCoderTests.csproj @@ -9,6 +9,7 @@ true false true + $(NoWarn);NU1903 From 2013caba8d2c15071da480552bd89cad20ef33f9 Mon Sep 17 00:00:00 2001 From: Shane32 Date: Sat, 27 Apr 2024 00:47:08 -0400 Subject: [PATCH 17/20] Fix workflow --- .github/workflows/wf-build-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wf-build-test.yml b/.github/workflows/wf-build-test.yml index b5dac4b0..f38dd9eb 100644 --- a/.github/workflows/wf-build-test.yml +++ b/.github/workflows/wf-build-test.yml @@ -63,11 +63,11 @@ jobs: - name: Run test .NET Core 1.1 working-directory: QRCoderTests - run: dotnet test -c Release -f netcoreapp1.1 --nologo # No coverage for .NETCORE 1.1 because Coverlet doesn't support it https://github.com/coverlet-coverage/coverlet/issues/466 + run: dotnet test -c Release -f netcoreapp1.1 --nologo --no-build # No coverage for .NETCORE 1.1 because Coverlet doesn't support it https://github.com/coverlet-coverage/coverlet/issues/466 - name: Run test .NET Core 2.0 working-directory: QRCoderTests - run: dotnet test -c Release -f netcoreapp2.0 --nologo /p:CollectCoverage=true /p:CoverletOutputFormat=opencover + run: dotnet test -c Release -f netcoreapp2.0 --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover - name: Run test .NET 5.0 working-directory: QRCoderTests @@ -87,7 +87,7 @@ jobs: - name: Run API approval tests working-directory: QRCoderApiTests - run: dotnet test -c Release -f net6.0 --nologo --no-build + run: dotnet test -c Release --nologo --no-build clean: needs: [build, test] From 4a7a1f2366daaba10a0e0b3beffa61bea72d7976 Mon Sep 17 00:00:00 2001 From: Shane32 Date: Sat, 27 Apr 2024 00:55:34 -0400 Subject: [PATCH 18/20] Update workflows --- .github/workflows/wf-build-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wf-build-test.yml b/.github/workflows/wf-build-test.yml index f38dd9eb..5df21935 100644 --- a/.github/workflows/wf-build-test.yml +++ b/.github/workflows/wf-build-test.yml @@ -63,11 +63,11 @@ jobs: - name: Run test .NET Core 1.1 working-directory: QRCoderTests - run: dotnet test -c Release -f netcoreapp1.1 --nologo --no-build # No coverage for .NETCORE 1.1 because Coverlet doesn't support it https://github.com/coverlet-coverage/coverlet/issues/466 + run: dotnet test -c Release -f netcoreapp1.1 --nologo # No coverage for .NETCORE 1.1 because Coverlet doesn't support it https://github.com/coverlet-coverage/coverlet/issues/466 - name: Run test .NET Core 2.0 working-directory: QRCoderTests - run: dotnet test -c Release -f netcoreapp2.0 --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover + run: dotnet test -c Release -f netcoreapp2.0 --nologo /p:CollectCoverage=true /p:CoverletOutputFormat=opencover - name: Run test .NET 5.0 working-directory: QRCoderTests From 38aa647e019b715a9ef523541c262d803af36952 Mon Sep 17 00:00:00 2001 From: Shane32 Date: Sat, 27 Apr 2024 01:15:52 -0400 Subject: [PATCH 19/20] Update for merge --- QRCoderApiTests/net60-windows/QRCoder.approved.txt | 2 ++ QRCoderApiTests/net60/QRCoder.approved.txt | 2 ++ QRCoderApiTests/netstandard13/QRCoder.approved.txt | 2 ++ 3 files changed, 6 insertions(+) diff --git a/QRCoderApiTests/net60-windows/QRCoder.approved.txt b/QRCoderApiTests/net60-windows/QRCoder.approved.txt index 63aabe9e..3f03e15b 100644 --- a/QRCoderApiTests/net60-windows/QRCoder.approved.txt +++ b/QRCoderApiTests/net60-windows/QRCoder.approved.txt @@ -876,10 +876,12 @@ namespace QRCoder { public QRCodeData(int version) { } public QRCodeData(byte[] rawData, QRCoder.QRCodeData.Compression compressMode) { } + 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, diff --git a/QRCoderApiTests/net60/QRCoder.approved.txt b/QRCoderApiTests/net60/QRCoder.approved.txt index e9d6a7aa..7b3c4ef1 100644 --- a/QRCoderApiTests/net60/QRCoder.approved.txt +++ b/QRCoderApiTests/net60/QRCoder.approved.txt @@ -810,10 +810,12 @@ namespace QRCoder { public QRCodeData(int version) { } public QRCodeData(byte[] rawData, QRCoder.QRCodeData.Compression compressMode) { } + 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, diff --git a/QRCoderApiTests/netstandard13/QRCoder.approved.txt b/QRCoderApiTests/netstandard13/QRCoder.approved.txt index bef4cb20..311ba68f 100644 --- a/QRCoderApiTests/netstandard13/QRCoder.approved.txt +++ b/QRCoderApiTests/netstandard13/QRCoder.approved.txt @@ -775,10 +775,12 @@ namespace QRCoder { public QRCodeData(int version) { } public QRCodeData(byte[] rawData, QRCoder.QRCodeData.Compression compressMode) { } + 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, From 50f40ec48a304a4ae83efb9093ecf3505f01c33e Mon Sep 17 00:00:00 2001 From: Shane32 Date: Sat, 27 Apr 2024 01:20:40 -0400 Subject: [PATCH 20/20] Update other workflows --- .github/workflows/wf-build-release-ci.yml | 24 ++++++++++++++--------- .github/workflows/wf-build-release.yml | 24 ++++++++++++++--------- .github/workflows/wf-build-test.yml | 2 +- 3 files changed, 31 insertions(+), 19 deletions(-) diff --git a/.github/workflows/wf-build-release-ci.yml b/.github/workflows/wf-build-release-ci.yml index 91b9bb5b..f2c78673 100644 --- a/.github/workflows/wf-build-release-ci.yml +++ b/.github/workflows/wf-build-release-ci.yml @@ -20,19 +20,13 @@ jobs: 1.0.x 2.0.x 5.0.x - 6.0.x + 6.0.x - - name: Setup MSBuild Path - uses: microsoft/setup-msbuild@v1 - - - name: Setup NuGet - uses: NuGet/setup-nuget@v2 - - name: Restore NuGet Packages - run: nuget restore QRCoder.sln + run: dotnet restore - name: Build library - run: msbuild QRCoder.sln /p:Configuration=Release /p:NoWarn="1182" /p:NoWarn="1701" /nr:false /t:Rebuild + run: dotnet build -c Release --no-restore - name: Upload artifacts uses: actions/upload-artifact@v4 @@ -60,28 +54,40 @@ jobs: 6.0.x - name: Run test .NET 3.5 + working-directory: QRCoderTests run: dotnet test -c Release -f net35 --nologo --no-build # No coverage for NET3.5 because of bug in combination with Coverlet+Stronh naming - name: Run test .NET 4.52 + working-directory: QRCoderTests run: dotnet test -c Release -f net452 --nologo --no-build # No coverage for NET4.5 because of bug in combination with Coverlet+Strong naming - name: Run test .NET Core 1.1 + working-directory: QRCoderTests run: dotnet test -c Release -f netcoreapp1.1 --nologo # No coverage for .NETCORE 1.1 because Coverlet doesn't support it https://github.com/coverlet-coverage/coverlet/issues/466 - name: Run test .NET Core 2.0 + working-directory: QRCoderTests run: dotnet test -c Release -f netcoreapp2.0 --nologo /p:CollectCoverage=true /p:CoverletOutputFormat=opencover - name: Run test .NET 5.0 + working-directory: QRCoderTests run: dotnet test -c Release -f net5.0 --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover - name: Run test .NET 5.0 Windows + working-directory: QRCoderTests run: dotnet test -c Release -f net5.0-windows --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover - name: Run test .NET 6.0 + working-directory: QRCoderTests run: dotnet test -c Release -f net6.0 --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover - name: Run test .NET 6.0 Windows + working-directory: QRCoderTests run: dotnet test -c Release -f net6.0-windows --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover + + - name: Run API approval tests + working-directory: QRCoderApiTests + run: dotnet test -c Release --nologo --no-build - name: Codecov update netcoreapp2.0 uses: codecov/codecov-action@v2 diff --git a/.github/workflows/wf-build-release.yml b/.github/workflows/wf-build-release.yml index 012001db..b14fa6d4 100644 --- a/.github/workflows/wf-build-release.yml +++ b/.github/workflows/wf-build-release.yml @@ -21,19 +21,13 @@ jobs: 1.0.x 2.0.x 5.0.x - 6.0.x + 6.0.x - - name: Setup MSBuild Path - uses: microsoft/setup-msbuild@v1 - - - name: Setup NuGet - uses: NuGet/setup-nuget@v2 - - name: Restore NuGet Packages - run: nuget restore QRCoder.sln + run: dotnet restore - name: Build library - run: msbuild QRCoder.sln /p:Configuration=Release /p:NoWarn="1182" /p:NoWarn="1701" /nr:false /t:Rebuild + run: dotnet build -c Release --no-restore - name: Upload artifacts uses: actions/upload-artifact@v4 @@ -61,28 +55,40 @@ jobs: 6.0.x - name: Run test .NET 3.5 + working-directory: QRCoderTests run: dotnet test -c Release -f net35 --nologo --no-build # No coverage for NET3.5 because of bug in combination with Coverlet+Stronh naming - name: Run test .NET 4.52 + working-directory: QRCoderTests run: dotnet test -c Release -f net452 --nologo --no-build # No coverage for NET4.5 because of bug in combination with Coverlet+Strong naming - name: Run test .NET Core 1.1 + working-directory: QRCoderTests run: dotnet test -c Release -f netcoreapp1.1 --nologo # No coverage for .NETCORE 1.1 because Coverlet doesn't support it https://github.com/coverlet-coverage/coverlet/issues/466 - name: Run test .NET Core 2.0 + working-directory: QRCoderTests run: dotnet test -c Release -f netcoreapp2.0 --nologo /p:CollectCoverage=true /p:CoverletOutputFormat=opencover - name: Run test .NET 5.0 + working-directory: QRCoderTests run: dotnet test -c Release -f net5.0 --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover - name: Run test .NET 5.0 Windows + working-directory: QRCoderTests run: dotnet test -c Release -f net5.0-windows --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover - name: Run test .NET 6.0 + working-directory: QRCoderTests run: dotnet test -c Release -f net6.0 --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover - name: Run test .NET 6.0 Windows + working-directory: QRCoderTests run: dotnet test -c Release -f net6.0-windows --nologo --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover + + - name: Run API approval tests + working-directory: QRCoderApiTests + run: dotnet test -c Release --nologo --no-build - name: Codecov update netcoreapp2.0 uses: codecov/codecov-action@v2 diff --git a/.github/workflows/wf-build-test.yml b/.github/workflows/wf-build-test.yml index 5df21935..5b5002fe 100644 --- a/.github/workflows/wf-build-test.yml +++ b/.github/workflows/wf-build-test.yml @@ -63,7 +63,7 @@ jobs: - name: Run test .NET Core 1.1 working-directory: QRCoderTests - run: dotnet test -c Release -f netcoreapp1.1 --nologo # No coverage for .NETCORE 1.1 because Coverlet doesn't support it https://github.com/coverlet-coverage/coverlet/issues/466 + run: dotnet test -c Release -f netcoreapp1.1 --nologo # No coverage for .NETCORE 1.1 because Coverlet doesn't support it https://github.com/coverlet-coverage/coverlet/issues/466 - name: Run test .NET Core 2.0 working-directory: QRCoderTests