diff --git a/Directory.Build.props b/Directory.Build.props
index 08cd893e..7e799f44 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -36,7 +36,7 @@
true
True
true
- $(NoWarn);CS1591;CS1572;CS1573;CS1587;IDE0005
+ $(NoWarn);IDE0005
True
None
diff --git a/Directory.Build.targets b/Directory.Build.targets
index d35e78b1..536e36c4 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -12,6 +12,11 @@
false
+
+
+ $(NoWarn);CS1591
+
+
true
diff --git a/QRCoder.Xaml/XamlQRCode.cs b/QRCoder.Xaml/XamlQRCode.cs
index a94ce002..6274bd39 100644
--- a/QRCoder.Xaml/XamlQRCode.cs
+++ b/QRCoder.Xaml/XamlQRCode.cs
@@ -5,6 +5,9 @@
namespace QRCoder.Xaml;
+///
+/// Represents a QR code generator that outputs QR codes as XAML DrawingImage objects.
+///
public class XamlQRCode : AbstractQRCode, IDisposable
{
///
@@ -12,11 +15,26 @@ public class XamlQRCode : AbstractQRCode, IDisposable
///
public XamlQRCode() { }
+ ///
+ /// Initializes a new instance of the class with the specified .
+ ///
+ /// generated by the QRCodeGenerator.
public XamlQRCode(QRCodeData data) : base(data) { }
+ ///
+ /// Returns a XAML DrawingImage that contains the resulting QR code.
+ ///
+ /// The number of pixels each dark/light module of the QR code will occupy in the final QR code image.
+ /// Returns the QR code graphic as a XAML DrawingImage.
public DrawingImage GetGraphic(int pixelsPerModule)
=> GetGraphic(pixelsPerModule, true);
+ ///
+ /// Returns a XAML DrawingImage that contains the resulting QR code.
+ ///
+ /// The number of pixels each dark/light module of the QR code will occupy in the final QR code image.
+ /// Indicates if quiet zones around the QR code should be drawn.
+ /// Returns the QR code graphic as a XAML DrawingImage.
public DrawingImage GetGraphic(int pixelsPerModule, bool drawQuietZones)
{
var drawableModulesCount = GetDrawableModulesCount(drawQuietZones);
@@ -24,9 +42,23 @@ public DrawingImage GetGraphic(int pixelsPerModule, bool drawQuietZones)
return GetGraphic(viewBox, new SolidColorBrush(Colors.Black), new SolidColorBrush(Colors.White), drawQuietZones);
}
+ ///
+ /// Returns a XAML DrawingImage that contains the resulting QR code.
+ ///
+ /// The size of the view box for the QR code.
+ /// Indicates if quiet zones around the QR code should be drawn.
+ /// Returns the QR code graphic as a XAML DrawingImage.
public DrawingImage GetGraphic(Size viewBox, bool drawQuietZones = true)
=> GetGraphic(viewBox, new SolidColorBrush(Colors.Black), new SolidColorBrush(Colors.White), drawQuietZones);
+ ///
+ /// Returns a XAML DrawingImage that contains the resulting QR code with specified colors.
+ ///
+ /// The number of pixels each dark/light module of the QR code will occupy in the final QR code image.
+ /// The color of the dark modules in hexadecimal format.
+ /// The color of the light modules in hexadecimal format.
+ /// Indicates if quiet zones around the QR code should be drawn.
+ /// Returns the QR code graphic as a XAML DrawingImage.
public DrawingImage GetGraphic(int pixelsPerModule, string darkColorHex, string lightColorHex, bool drawQuietZones = true)
{
var drawableModulesCount = GetDrawableModulesCount(drawQuietZones);
@@ -34,6 +66,14 @@ public DrawingImage GetGraphic(int pixelsPerModule, string darkColorHex, string
return GetGraphic(viewBox, new SolidColorBrush((Color)ColorConverter.ConvertFromString(darkColorHex)), new SolidColorBrush((Color)ColorConverter.ConvertFromString(lightColorHex)), drawQuietZones);
}
+ ///
+ /// Returns a XAML DrawingImage that contains the resulting QR code with specified brushes.
+ ///
+ /// The size of the view box for the QR code.
+ /// The brush for the dark modules.
+ /// The brush for the light modules.
+ /// Indicates if quiet zones around the QR code should be drawn.
+ /// Returns the QR code graphic as a XAML DrawingImage.
public DrawingImage GetGraphic(Size viewBox, Brush darkBrush, Brush lightBrush, bool drawQuietZones = true)
{
var drawableModulesCount = GetDrawableModulesCount(drawQuietZones);
@@ -67,6 +107,12 @@ public DrawingImage GetGraphic(Size viewBox, Brush darkBrush, Brush lightBrush,
private int GetDrawableModulesCount(bool drawQuietZones = true)
=> QrCodeData.ModuleMatrix.Count - (drawQuietZones ? 0 : 8);
+ ///
+ /// Calculates the number of units per module for the given view box size.
+ ///
+ /// The size of the view box for the QR code.
+ /// Indicates if quiet zones around the QR code should be drawn.
+ /// Returns the number of units per module.
public double GetUnitsPerModule(Size viewBox, bool drawQuietZones = true)
{
var drawableModulesCount = GetDrawableModulesCount(drawQuietZones);
@@ -75,8 +121,25 @@ public double GetUnitsPerModule(Size viewBox, bool drawQuietZones = true)
}
}
+///
+/// Provides static methods for creating XAML DrawingImage QR codes.
+///
public static class XamlQRCodeHelper
{
+ ///
+ /// Creates a XAML DrawingImage QR code with a single function call.
+ ///
+ /// The text or payload to be encoded inside the QR code.
+ /// The number of pixels each dark/light module of the QR code will occupy in the final QR code image.
+ /// The color of the dark modules in hexadecimal format.
+ /// The color of the light modules in hexadecimal format.
+ /// The level of error correction data.
+ /// Specifies whether the generator should be forced to work in UTF-8 mode.
+ /// Specifies whether the byte-order-mark should be used.
+ /// Specifies which ECI mode should be used.
+ /// Sets the fixed QR code target version.
+ /// Indicates if quiet zones around the QR code should be drawn.
+ /// Returns the QR code graphic as a XAML DrawingImage.
public static DrawingImage GetQRCode(string plainText, int pixelsPerModule, string darkColorHex, string lightColorHex, ECCLevel eccLevel, bool forceUtf8 = false, bool utf8BOM = false, EciMode eciMode = EciMode.Default, int requestedVersion = -1, bool drawQuietZones = true)
{
using var qrGenerator = new QRCodeGenerator();
diff --git a/QRCoder/ASCIIQRCode.cs b/QRCoder/ASCIIQRCode.cs
index c84fab8f..1a9405ef 100644
--- a/QRCoder/ASCIIQRCode.cs
+++ b/QRCoder/ASCIIQRCode.cs
@@ -15,6 +15,10 @@ public class AsciiQRCode : AbstractQRCode, IDisposable
///
public AsciiQRCode() { }
+ ///
+ /// Initializes a new instance of the class with the specified .
+ ///
+ /// The QR code data generated by the .
public AsciiQRCode(QRCodeData data) : base(data) { }
@@ -132,6 +136,21 @@ public string GetGraphicSmall(bool drawQuietZones = true, bool invert = false, s
///
public static class AsciiQRCodeHelper
{
+ ///
+ /// Generates an ASCII QR code graphic with specified parameters.
+ ///
+ /// The text to be encoded in the QR code.
+ /// Number of repeated characters per module.
+ /// String representing dark modules.
+ /// String representing light modules.
+ /// Error correction level for the QR code.
+ /// Force UTF-8 encoding.
+ /// Include UTF-8 byte order mark.
+ /// Extended Channel Interpretation mode.
+ /// Specific QR code version to use.
+ /// End of line separator.
+ /// Include quiet zones around the QR code.
+ /// ASCII representation of the QR code.
public static string GetQRCode(string plainText, int pixelsPerModule, string darkColorString, string whiteSpaceString, ECCLevel eccLevel, bool forceUtf8 = false, bool utf8BOM = false, EciMode eciMode = EciMode.Default, int requestedVersion = -1, string endOfLine = "\n", bool drawQuietZones = true)
{
using var qrGenerator = new QRCodeGenerator();
@@ -140,6 +159,19 @@ public static string GetQRCode(string plainText, int pixelsPerModule, string dar
return qrCode.GetGraphic(pixelsPerModule, darkColorString, whiteSpaceString, drawQuietZones, endOfLine);
}
+ ///
+ /// Generates a small ASCII QR code graphic with specified parameters.
+ ///
+ /// The text to be encoded in the QR code.
+ /// Error correction level for the QR code.
+ /// Force UTF-8 encoding.
+ /// Include UTF-8 byte order mark.
+ /// Extended Channel Interpretation mode.
+ /// Specific QR code version to use.
+ /// End of line separator.
+ /// Include quiet zones around the QR code.
+ /// Invert dark and light colors.
+ /// Minified ASCII representation of the QR code.
public static string GetQRCode(string plainText, ECCLevel eccLevel, bool forceUtf8 = false, bool utf8BOM = false, EciMode eciMode = EciMode.Default, int requestedVersion = -1, string endOfLine = "\n", bool drawQuietZones = true, bool invert = true)
{
using var qrGenerator = new QRCodeGenerator();
diff --git a/QRCoder/ArtQRCode.cs b/QRCoder/ArtQRCode.cs
index 09b8ad06..575476ab 100644
--- a/QRCoder/ArtQRCode.cs
+++ b/QRCoder/ArtQRCode.cs
@@ -236,7 +236,14 @@ private Bitmap Resize(Bitmap image, int newSize)
///
public enum QuietZoneStyle
{
+ ///
+ /// Quiet zones are rendered with dotted modules.
+ ///
Dotted,
+
+ ///
+ /// Quiet zones are rendered with flat, solid modules.
+ ///
Flat
}
@@ -245,7 +252,14 @@ public enum QuietZoneStyle
///
public enum BackgroundImageStyle
{
+ ///
+ /// Background image spans the complete graphic.
+ ///
Fill,
+
+ ///
+ /// Background image is only painted in the data area, excluding the quiet zone.
+ ///
DataAreaOnly
}
}
diff --git a/QRCoder/Base64QRCode.cs b/QRCoder/Base64QRCode.cs
index b6619b03..3267b47d 100644
--- a/QRCoder/Base64QRCode.cs
+++ b/QRCoder/Base64QRCode.cs
@@ -163,22 +163,22 @@ private string BitmapToBase64(Bitmap bmp, ImageType imgType)
///
public enum ImageType
{
+ ///
+ /// Graphics Interchange Format (GIF) image format, a bitmap image format with limited color support
+ ///
#if NET6_0_OR_GREATER
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
#endif
+ Gif,
///
- /// GIF image format.
+ /// Joint Photographic Experts Group (JPEG) image format, a lossy compressed image format
///
- Gif,
#if NET6_0_OR_GREATER
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
#endif
- ///
- /// JPEG image format.
- ///
Jpeg,
///
- /// PNG image format.
+ /// Portable Network Graphics (PNG) image format, a lossless raster graphics format
///
Png
}
diff --git a/QRCoder/PayloadGenerator/BezahlCode.cs b/QRCoder/PayloadGenerator/BezahlCode.cs
index df9f17f6..9ece677d 100644
--- a/QRCoder/PayloadGenerator/BezahlCode.cs
+++ b/QRCoder/PayloadGenerator/BezahlCode.cs
@@ -73,7 +73,6 @@ public BezahlCode(AuthorityType authority, string name, string account, string b
/// Manadate id (Mandatsreferenz)
/// Signature date (Erteilungsdatum des Mandats)
/// Reason (Verwendungszweck)
- /// Transfer Key (Textschlüssel, z.B. Spendenzahlung = 69)
/// SEPA reference (SEPA-Referenz)
/// Currency (Währung)
/// Execution date (Ausführungsdatum)
@@ -336,183 +335,717 @@ public override string ToString()
///
public enum Currency
{
+ ///
+ /// United Arab Emirates Dirham
+ ///
AED = 784,
+ ///
+ /// Afghan Afghani
+ ///
AFN = 971,
+ ///
+ /// Albanian Lek
+ ///
ALL = 008,
+ ///
+ /// Armenian Dram
+ ///
AMD = 051,
+ ///
+ /// Netherlands Antillean Guilder
+ ///
ANG = 532,
+ ///
+ /// Angolan Kwanza
+ ///
AOA = 973,
+ ///
+ /// Argentine Peso
+ ///
ARS = 032,
+ ///
+ /// Australian Dollar
+ ///
AUD = 036,
+ ///
+ /// Aruban Florin
+ ///
AWG = 533,
+ ///
+ /// Azerbaijani Manat
+ ///
AZN = 944,
+ ///
+ /// Bosnia and Herzegovina Convertible Mark
+ ///
BAM = 977,
+ ///
+ /// Barbados Dollar
+ ///
BBD = 052,
+ ///
+ /// Bangladeshi Taka
+ ///
BDT = 050,
+ ///
+ /// Bulgarian Lev
+ ///
BGN = 975,
+ ///
+ /// Bahraini Dinar
+ ///
BHD = 048,
+ ///
+ /// Burundian Franc
+ ///
BIF = 108,
+ ///
+ /// Bermudian Dollar
+ ///
BMD = 060,
+ ///
+ /// Brunei Dollar
+ ///
BND = 096,
+ ///
+ /// Bolivian Boliviano
+ ///
BOB = 068,
+ ///
+ /// Bolivian Mvdol (funds code)
+ ///
BOV = 984,
+ ///
+ /// Brazilian Real
+ ///
BRL = 986,
+ ///
+ /// Bahamian Dollar
+ ///
BSD = 044,
+ ///
+ /// Bhutanese Ngultrum
+ ///
BTN = 064,
+ ///
+ /// Botswana Pula
+ ///
BWP = 072,
+ ///
+ /// Belarusian Ruble
+ ///
BYR = 974,
+ ///
+ /// Belize Dollar
+ ///
BZD = 084,
+ ///
+ /// Canadian Dollar
+ ///
CAD = 124,
+ ///
+ /// Congolese Franc
+ ///
CDF = 976,
+ ///
+ /// WIR Euro (complementary currency)
+ ///
CHE = 947,
+ ///
+ /// Swiss Franc
+ ///
CHF = 756,
+ ///
+ /// WIR Franc (complementary currency)
+ ///
CHW = 948,
+ ///
+ /// Unidad de Fomento (funds code)
+ ///
CLF = 990,
+ ///
+ /// Chilean Peso
+ ///
CLP = 152,
+ ///
+ /// Chinese Yuan
+ ///
CNY = 156,
+ ///
+ /// Colombian Peso
+ ///
COP = 170,
+ ///
+ /// Unidad de Valor Real (UVR) (funds code)
+ ///
COU = 970,
+ ///
+ /// Costa Rican Colón
+ ///
CRC = 188,
+ ///
+ /// Cuban Convertible Peso
+ ///
CUC = 931,
+ ///
+ /// Cuban Peso
+ ///
CUP = 192,
+ ///
+ /// Cape Verde Escudo
+ ///
CVE = 132,
+ ///
+ /// Czech Koruna
+ ///
CZK = 203,
+ ///
+ /// Djiboutian Franc
+ ///
DJF = 262,
+ ///
+ /// Danish Krone
+ ///
DKK = 208,
+ ///
+ /// Dominican Peso
+ ///
DOP = 214,
+ ///
+ /// Algerian Dinar
+ ///
DZD = 012,
+ ///
+ /// Egyptian Pound
+ ///
EGP = 818,
+ ///
+ /// Eritrean Nakfa
+ ///
ERN = 232,
+ ///
+ /// Ethiopian Birr
+ ///
ETB = 230,
+ ///
+ /// Euro
+ ///
EUR = 978,
+ ///
+ /// Fiji Dollar
+ ///
FJD = 242,
+ ///
+ /// Falkland Islands Pound
+ ///
FKP = 238,
+ ///
+ /// Pound Sterling
+ ///
GBP = 826,
+ ///
+ /// Georgian Lari
+ ///
GEL = 981,
+ ///
+ /// Ghanaian Cedi
+ ///
GHS = 936,
+ ///
+ /// Gibraltar Pound
+ ///
GIP = 292,
+ ///
+ /// Gambian Dalasi
+ ///
GMD = 270,
+ ///
+ /// Guinean Franc
+ ///
GNF = 324,
+ ///
+ /// Guatemalan Quetzal
+ ///
GTQ = 320,
+ ///
+ /// Guyanese Dollar
+ ///
GYD = 328,
+ ///
+ /// Hong Kong Dollar
+ ///
HKD = 344,
+ ///
+ /// Honduran Lempira
+ ///
HNL = 340,
+ ///
+ /// Croatian Kuna
+ ///
HRK = 191,
+ ///
+ /// Haitian Gourde
+ ///
HTG = 332,
+ ///
+ /// Hungarian Forint
+ ///
HUF = 348,
+ ///
+ /// Indonesian Rupiah
+ ///
IDR = 360,
+ ///
+ /// Israeli New Shekel
+ ///
ILS = 376,
+ ///
+ /// Indian Rupee
+ ///
INR = 356,
+ ///
+ /// Iraqi Dinar
+ ///
IQD = 368,
+ ///
+ /// Iranian Rial
+ ///
IRR = 364,
+ ///
+ /// Icelandic Króna
+ ///
ISK = 352,
+ ///
+ /// Jamaican Dollar
+ ///
JMD = 388,
+ ///
+ /// Jordanian Dinar
+ ///
JOD = 400,
+ ///
+ /// Japanese Yen
+ ///
JPY = 392,
+ ///
+ /// Kenyan Shilling
+ ///
KES = 404,
+ ///
+ /// Kyrgyzstani Som
+ ///
KGS = 417,
+ ///
+ /// Cambodian Riel
+ ///
KHR = 116,
+ ///
+ /// Comoro Franc
+ ///
KMF = 174,
+ ///
+ /// North Korean Won
+ ///
KPW = 408,
+ ///
+ /// South Korean Won
+ ///
KRW = 410,
+ ///
+ /// Kuwaiti Dinar
+ ///
KWD = 414,
+ ///
+ /// Cayman Islands Dollar
+ ///
KYD = 136,
+ ///
+ /// Kazakhstani Tenge
+ ///
KZT = 398,
+ ///
+ /// Lao Kip
+ ///
LAK = 418,
+ ///
+ /// Lebanese Pound
+ ///
LBP = 422,
+ ///
+ /// Sri Lankan Rupee
+ ///
LKR = 144,
+ ///
+ /// Liberian Dollar
+ ///
LRD = 430,
+ ///
+ /// Lesotho Loti
+ ///
LSL = 426,
+ ///
+ /// Libyan Dinar
+ ///
LYD = 434,
+ ///
+ /// Moroccan Dirham
+ ///
MAD = 504,
+ ///
+ /// Moldovan Leu
+ ///
MDL = 498,
+ ///
+ /// Malagasy Ariary
+ ///
MGA = 969,
+ ///
+ /// Macedonian Denar
+ ///
MKD = 807,
+ ///
+ /// Myanmar Kyat
+ ///
MMK = 104,
+ ///
+ /// Mongolian Tögrög
+ ///
MNT = 496,
+ ///
+ /// Macanese Pataca
+ ///
MOP = 446,
+ ///
+ /// Mauritanian Ouguiya
+ ///
MRO = 478,
+ ///
+ /// Mauritian Rupee
+ ///
MUR = 480,
+ ///
+ /// Maldivian Rufiyaa
+ ///
MVR = 462,
+ ///
+ /// Malawian Kwacha
+ ///
MWK = 454,
+ ///
+ /// Mexican Peso
+ ///
MXN = 484,
+ ///
+ /// Mexican Unidad de Inversión (UDI) (funds code)
+ ///
MXV = 979,
+ ///
+ /// Malaysian Ringgit
+ ///
MYR = 458,
+ ///
+ /// Mozambican Metical
+ ///
MZN = 943,
+ ///
+ /// Namibian Dollar
+ ///
NAD = 516,
+ ///
+ /// Nigerian Naira
+ ///
NGN = 566,
+ ///
+ /// Nicaraguan Córdoba
+ ///
NIO = 558,
+ ///
+ /// Norwegian Krone
+ ///
NOK = 578,
+ ///
+ /// Nepalese Rupee
+ ///
NPR = 524,
+ ///
+ /// New Zealand Dollar
+ ///
NZD = 554,
+ ///
+ /// Omani Rial
+ ///
OMR = 512,
+ ///
+ /// Panamanian Balboa
+ ///
PAB = 590,
+ ///
+ /// Peruvian Sol
+ ///
PEN = 604,
+ ///
+ /// Papua New Guinean Kina
+ ///
PGK = 598,
+ ///
+ /// Philippine Peso
+ ///
PHP = 608,
+ ///
+ /// Pakistani Rupee
+ ///
PKR = 586,
+ ///
+ /// Polish Złoty
+ ///
PLN = 985,
+ ///
+ /// Paraguayan Guaraní
+ ///
PYG = 600,
+ ///
+ /// Qatari Riyal
+ ///
QAR = 634,
+ ///
+ /// Romanian Leu
+ ///
RON = 946,
+ ///
+ /// Serbian Dinar
+ ///
RSD = 941,
+ ///
+ /// Russian Ruble
+ ///
RUB = 643,
+ ///
+ /// Rwandan Franc
+ ///
RWF = 646,
+ ///
+ /// Saudi Riyal
+ ///
SAR = 682,
+ ///
+ /// Solomon Islands Dollar
+ ///
SBD = 090,
+ ///
+ /// Seychelles Rupee
+ ///
SCR = 690,
+ ///
+ /// Sudanese Pound
+ ///
SDG = 938,
+ ///
+ /// Swedish Krona
+ ///
SEK = 752,
+ ///
+ /// Singapore Dollar
+ ///
SGD = 702,
+ ///
+ /// Saint Helena Pound
+ ///
SHP = 654,
+ ///
+ /// Sierra Leonean Leone
+ ///
SLL = 694,
+ ///
+ /// Somali Shilling
+ ///
SOS = 706,
+ ///
+ /// Surinamese Dollar
+ ///
SRD = 968,
+ ///
+ /// South Sudanese Pound
+ ///
SSP = 728,
+ ///
+ /// São Tomé and Príncipe Dobra
+ ///
STD = 678,
+ ///
+ /// Salvadoran Colón
+ ///
SVC = 222,
+ ///
+ /// Syrian Pound
+ ///
SYP = 760,
+ ///
+ /// Swazi Lilangeni
+ ///
SZL = 748,
+ ///
+ /// Thai Baht
+ ///
THB = 764,
+ ///
+ /// Tajikistani Somoni
+ ///
TJS = 972,
+ ///
+ /// Turkmenistan Manat
+ ///
TMT = 934,
+ ///
+ /// Tunisian Dinar
+ ///
TND = 788,
+ ///
+ /// Tongan Paʻanga
+ ///
TOP = 776,
+ ///
+ /// Turkish Lira
+ ///
TRY = 949,
+ ///
+ /// Trinidad and Tobago Dollar
+ ///
TTD = 780,
+ ///
+ /// New Taiwan Dollar
+ ///
TWD = 901,
+ ///
+ /// Tanzanian Shilling
+ ///
TZS = 834,
+ ///
+ /// Ukrainian Hryvnia
+ ///
UAH = 980,
+ ///
+ /// Ugandan Shilling
+ ///
UGX = 800,
+ ///
+ /// United States Dollar
+ ///
USD = 840,
+ ///
+ /// United States Dollar (Next day) (funds code)
+ ///
USN = 997,
+ ///
+ /// Uruguay Peso en Unidades Indexadas (URUIURUI) (funds code)
+ ///
UYI = 940,
+ ///
+ /// Uruguayan Peso
+ ///
UYU = 858,
+ ///
+ /// Uzbekistan Som
+ ///
UZS = 860,
+ ///
+ /// Venezuelan Bolívar
+ ///
VEF = 937,
+ ///
+ /// Vietnamese Đồng
+ ///
VND = 704,
+ ///
+ /// Vanuatu Vatu
+ ///
VUV = 548,
+ ///
+ /// Samoan Tālā
+ ///
WST = 882,
+ ///
+ /// CFA Franc BEAC
+ ///
XAF = 950,
+ ///
+ /// Silver (one troy ounce)
+ ///
XAG = 961,
+ ///
+ /// Gold (one troy ounce)
+ ///
XAU = 959,
+ ///
+ /// Bond Markets Unit European Composite Unit (EURCO)
+ ///
XBA = 955,
+ ///
+ /// Bond Markets Unit European Monetary Unit (E.M.U.-6)
+ ///
XBB = 956,
+ ///
+ /// Bond Markets Unit European Unit of Account 9 (E.U.A.-9)
+ ///
XBC = 957,
+ ///
+ /// Bond Markets Unit European Unit of Account 17 (E.U.A.-17)
+ ///
XBD = 958,
+ ///
+ /// East Caribbean Dollar
+ ///
XCD = 951,
+ ///
+ /// Special Drawing Rights
+ ///
XDR = 960,
+ ///
+ /// CFA Franc BCEAO
+ ///
XOF = 952,
+ ///
+ /// Palladium (one troy ounce)
+ ///
XPD = 964,
+ ///
+ /// CFP Franc
+ ///
XPF = 953,
+ ///
+ /// Platinum (one troy ounce)
+ ///
XPT = 962,
+ ///
+ /// SUCRE
+ ///
XSU = 994,
+ ///
+ /// Codes specifically reserved for testing purposes
+ ///
XTS = 963,
+ ///
+ /// ADB Unit of Account
+ ///
XUA = 965,
+ ///
+ /// The code assigned for transactions where no currency is involved
+ ///
XXX = 999,
+ ///
+ /// Yemeni Rial
+ ///
YER = 886,
+ ///
+ /// South African Rand
+ ///
ZAR = 710,
+ ///
+ /// Zambian Kwacha
+ ///
ZMW = 967,
+ ///
+ /// Zimbabwean Dollar
+ ///
ZWL = 932
}
diff --git a/QRCoder/PayloadGenerator/OneTimePassword.cs b/QRCoder/PayloadGenerator/OneTimePassword.cs
index b942b0c8..a78f9ec6 100644
--- a/QRCoder/PayloadGenerator/OneTimePassword.cs
+++ b/QRCoder/PayloadGenerator/OneTimePassword.cs
@@ -67,7 +67,14 @@ public OoneTimePasswordAuthAlgorithm Algorithm
///
public enum OneTimePasswordAuthType
{
+ ///
+ /// Time-based One-Time Password (TOTP)
+ ///
TOTP,
+
+ ///
+ /// HMAC-based One-Time Password (HOTP)
+ ///
HOTP,
}
@@ -76,8 +83,19 @@ public enum OneTimePasswordAuthType
///
public enum OneTimePasswordAuthAlgorithm
{
+ ///
+ /// SHA-1 hashing algorithm
+ ///
SHA1,
+
+ ///
+ /// SHA-256 hashing algorithm
+ ///
SHA256,
+
+ ///
+ /// SHA-512 hashing algorithm
+ ///
SHA512,
}
@@ -87,8 +105,19 @@ public enum OneTimePasswordAuthAlgorithm
[Obsolete("This enum is obsolete, use " + nameof(OneTimePasswordAuthAlgorithm) + " instead", false)]
public enum OoneTimePasswordAuthAlgorithm
{
+ ///
+ /// SHA-1 hashing algorithm (Obsolete)
+ ///
SHA1,
+
+ ///
+ /// SHA-256 hashing algorithm (Obsolete)
+ ///
SHA256,
+
+ ///
+ /// SHA-512 hashing algorithm (Obsolete)
+ ///
SHA512,
}
diff --git a/QRCoder/PayloadGenerator/RussiaPaymentOrder.cs b/QRCoder/PayloadGenerator/RussiaPaymentOrder.cs
index a6b1e1b8..fbedef6b 100644
--- a/QRCoder/PayloadGenerator/RussiaPaymentOrder.cs
+++ b/QRCoder/PayloadGenerator/RussiaPaymentOrder.cs
@@ -586,20 +586,94 @@ public string? TaxPaytKind
///
public enum TechCode
{
+ ///
+ /// Mobile and landline telephone services
+ /// Мобильная связь и стационарный телефон
+ ///
Мобильная_связь_стационарный_телефон = 01,
+
+ ///
+ /// Utility services (Housing and Communal Services)
+ /// Коммунальные услуги (ЖКХ)
+ ///
Коммунальные_услуги_ЖКХAFN = 02,
+
+ ///
+ /// Traffic police, taxes, duties, and budget payments
+ /// ГИБДД, налоги, пошлины, бюджетные платежи
+ ///
ГИБДД_налоги_пошлины_бюджетные_платежи = 03,
+
+ ///
+ /// Security services
+ /// Охранные услуги
+ ///
Охранные_услуги = 04,
+
+ ///
+ /// Services provided by the Federal Migration Service
+ /// Услуги, оказываемые УФМС
+ ///
Услуги_оказываемые_УФМС = 05,
+
+ ///
+ /// Pension Fund of the Russian Federation
+ /// Пенсионный фонд России (ПФР)
+ ///
ПФР = 06,
+
+ ///
+ /// Loan repayment
+ /// Погашение кредитов
+ ///
Погашение_кредитов = 07,
+
+ ///
+ /// Educational institutions
+ /// Образовательные учреждения
+ ///
Образовательные_учреждения = 08,
+
+ ///
+ /// Internet and TV services
+ /// Интернет и телевидение
+ ///
Интернет_и_ТВ = 09,
+
+ ///
+ /// Electronic money
+ /// Электронные деньги
+ ///
Электронные_деньги = 10,
+
+ ///
+ /// Recreation and travel
+ /// Отдых и путешествия
+ ///
Отдых_и_путешествия = 11,
+
+ ///
+ /// Investments and insurance
+ /// Инвестиции и страхование
+ ///
Инвестиции_и_страхование = 12,
+
+ ///
+ /// Sports and health
+ /// Спорт и здоровье
+ ///
Спорт_и_здоровье = 13,
+
+ ///
+ /// Charitable and public organizations
+ /// Благотворительные и общественные организации
+ ///
Благотворительные_и_общественные_организации = 14,
+
+ ///
+ /// Other services
+ /// Прочие услуги
+ ///
Прочие_услуги = 15
}
diff --git a/QRCoder/PayloadGenerator/ShadowSocksConfig.cs b/QRCoder/PayloadGenerator/ShadowSocksConfig.cs
index 67b2821f..01d023fd 100644
--- a/QRCoder/PayloadGenerator/ShadowSocksConfig.cs
+++ b/QRCoder/PayloadGenerator/ShadowSocksConfig.cs
@@ -194,48 +194,195 @@ public override string ToString()
public enum Method
{
// AEAD
+ ///
+ /// ChaCha20-IETF with Poly1305 AEAD encryption method
+ ///
Chacha20IetfPoly1305,
+
+ ///
+ /// AES-128 Galois/Counter Mode (GCM) encryption method
+ ///
Aes128Gcm,
+
+ ///
+ /// AES-192 Galois/Counter Mode (GCM) encryption method
+ ///
Aes192Gcm,
+
+ ///
+ /// AES-256 Galois/Counter Mode (GCM) encryption method
+ ///
Aes256Gcm,
+
// AEAD, not standard
+ ///
+ /// Extended ChaCha20-IETF with Poly1305 AEAD encryption method (non-standard)
+ ///
XChacha20IetfPoly1305,
+
// Stream cipher
+ ///
+ /// AES-128 Cipher Feedback (CFB) stream cipher
+ ///
Aes128Cfb,
+
+ ///
+ /// AES-192 Cipher Feedback (CFB) stream cipher
+ ///
Aes192Cfb,
+
+ ///
+ /// AES-256 Cipher Feedback (CFB) stream cipher
+ ///
Aes256Cfb,
+
+ ///
+ /// AES-128 Counter (CTR) stream cipher
+ ///
Aes128Ctr,
+
+ ///
+ /// AES-192 Counter (CTR) stream cipher
+ ///
Aes192Ctr,
+
+ ///
+ /// AES-256 Counter (CTR) stream cipher
+ ///
Aes256Ctr,
+
+ ///
+ /// Camellia-128 Cipher Feedback (CFB) stream cipher
+ ///
Camellia128Cfb,
+
+ ///
+ /// Camellia-192 Cipher Feedback (CFB) stream cipher
+ ///
Camellia192Cfb,
+
+ ///
+ /// Camellia-256 Cipher Feedback (CFB) stream cipher
+ ///
Camellia256Cfb,
+
+ ///
+ /// ChaCha20-IETF stream cipher
+ ///
Chacha20Ietf,
+
// alias of Aes256Cfb
+ ///
+ /// Alias for AES-256 Cipher Feedback (CFB) stream cipher
+ ///
Aes256Cb,
+
// Stream cipher, not standard
+ ///
+ /// AES-128 Output Feedback (OFB) stream cipher (non-standard)
+ ///
Aes128Ofb,
+
+ ///
+ /// AES-192 Output Feedback (OFB) stream cipher (non-standard)
+ ///
Aes192Ofb,
+
+ ///
+ /// AES-256 Output Feedback (OFB) stream cipher (non-standard)
+ ///
Aes256Ofb,
+
+ ///
+ /// AES-128 Cipher Feedback 1-bit (CFB1) stream cipher
+ ///
Aes128Cfb1,
+
+ ///
+ /// AES-192 Cipher Feedback 1-bit (CFB1) stream cipher
+ ///
Aes192Cfb1,
+
+ ///
+ /// AES-256 Cipher Feedback 1-bit (CFB1) stream cipher
+ ///
Aes256Cfb1,
+
+ ///
+ /// AES-128 Cipher Feedback 8-bit (CFB8) stream cipher
+ ///
Aes128Cfb8,
+
+ ///
+ /// AES-192 Cipher Feedback 8-bit (CFB8) stream cipher
+ ///
Aes192Cfb8,
+
+ ///
+ /// AES-256 Cipher Feedback 8-bit (CFB8) stream cipher
+ ///
Aes256Cfb8,
+
// Stream cipher, deprecated
+ ///
+ /// ChaCha20 stream cipher (deprecated)
+ ///
Chacha20,
+
+ ///
+ /// Blowfish Cipher Feedback (CFB) stream cipher (deprecated)
+ ///
BfCfb,
+
+ ///
+ /// RC4-MD5 stream cipher (deprecated)
+ ///
Rc4Md5,
+
+ ///
+ /// Salsa20 stream cipher (deprecated)
+ ///
Salsa20,
+
// Not standard and not in active use
+ ///
+ /// DES Cipher Feedback (CFB) stream cipher (not standard, not in active use)
+ ///
DesCfb,
+
+ ///
+ /// IDEA Cipher Feedback (CFB) stream cipher (not standard, not in active use)
+ ///
IdeaCfb,
+
+ ///
+ /// RC2 Cipher Feedback (CFB) stream cipher (not standard, not in active use)
+ ///
Rc2Cfb,
+
+ ///
+ /// CAST5 Cipher Feedback (CFB) stream cipher (not standard, not in active use)
+ ///
Cast5Cfb,
+
+ ///
+ /// Salsa20 Counter (CTR) stream cipher (not standard, not in active use)
+ ///
Salsa20Ctr,
+
+ ///
+ /// RC4 stream cipher (not standard, not in active use)
+ ///
Rc4,
+
+ ///
+ /// SEED Cipher Feedback (CFB) stream cipher (not standard, not in active use)
+ ///
SeedCfb,
+
+ ///
+ /// Table-based encryption method (not standard, not in active use)
+ ///
Table
}
diff --git a/QRCoder/PayloadGenerator/SwissQrCode.cs b/QRCoder/PayloadGenerator/SwissQrCode.cs
index 6c1bb80e..31e48729 100644
--- a/QRCoder/PayloadGenerator/SwissQrCode.cs
+++ b/QRCoder/PayloadGenerator/SwissQrCode.cs
@@ -41,6 +41,7 @@ public class SwissQrCode : Payload
/// Currency (either EUR or CHF)
/// Creditor (payee) information
/// Reference information
+ /// Additional information for the QR code
/// Debitor (payer) information
/// Amount
/// Requested date of debitor's payment
diff --git a/QRCoder/PdfByteQRCode.cs b/QRCoder/PdfByteQRCode.cs
index 84df07e6..234b43e4 100644
--- a/QRCoder/PdfByteQRCode.cs
+++ b/QRCoder/PdfByteQRCode.cs
@@ -216,12 +216,12 @@ public byte[] GetGraphic(int pixelsPerModule, string darkColorHtmlHex, string li
}
}
-#if NET6_0_OR_GREATER
-[System.Runtime.Versioning.SupportedOSPlatform("windows")]
-#endif
///
/// Provides static methods for creating PDF byte array QR codes.
///
+#if NET6_0_OR_GREATER
+[System.Runtime.Versioning.SupportedOSPlatform("windows")]
+#endif
public static class PdfByteQRCodeHelper
{
///
diff --git a/QRCoder/QRCode.cs b/QRCoder/QRCode.cs
index 8b312746..4ea53d93 100644
--- a/QRCoder/QRCode.cs
+++ b/QRCoder/QRCode.cs
@@ -6,12 +6,12 @@
namespace QRCoder;
-#if NET6_0_OR_GREATER
-[System.Runtime.Versioning.SupportedOSPlatform("windows")]
-#endif
///
/// Represents a QR code generator that outputs QR codes as bitmap images.
///
+#if NET6_0_OR_GREATER
+[System.Runtime.Versioning.SupportedOSPlatform("windows")]
+#endif
public class QRCode : AbstractQRCode, IDisposable
{
///
@@ -169,12 +169,12 @@ internal GraphicsPath CreateRoundedRectanglePath(RectangleF rect, int cornerRadi
}
}
-#if NET6_0_OR_GREATER
-[System.Runtime.Versioning.SupportedOSPlatform("windows")]
-#endif
///
/// Provides static methods for creating bitmap QR codes.
///
+#if NET6_0_OR_GREATER
+[System.Runtime.Versioning.SupportedOSPlatform("windows")]
+#endif
public static class QRCodeHelper
{
///
diff --git a/QRCoder/QRCodeGenerator/ModulePlacer.BlockedModules.cs b/QRCoder/QRCodeGenerator/ModulePlacer.BlockedModules.cs
index 3a79ed5c..3337e507 100644
--- a/QRCoder/QRCodeGenerator/ModulePlacer.BlockedModules.cs
+++ b/QRCoder/QRCodeGenerator/ModulePlacer.BlockedModules.cs
@@ -18,9 +18,9 @@ public struct BlockedModules : IDisposable
private static BitArray[]? _staticBlockedModules;
///
- /// Initializes a new instance of the struct with a specified capacity.
+ /// Initializes a new instance of the struct with a specified size.
///
- /// The initial capacity of the blocked modules list.
+ /// The size of the blocked modules matrix.
public BlockedModules(int size)
{
_blockedModules = Interlocked.Exchange(ref _staticBlockedModules, null)!;
diff --git a/QRCoder/QRCodeGenerator/ModulePlacer.cs b/QRCoder/QRCodeGenerator/ModulePlacer.cs
index 774d13aa..687d0d67 100644
--- a/QRCoder/QRCodeGenerator/ModulePlacer.cs
+++ b/QRCoder/QRCodeGenerator/ModulePlacer.cs
@@ -13,6 +13,7 @@ private static partial class ModulePlacer
///
/// The QR code data structure to modify.
/// The bit array containing the version information.
+ /// Indicates whether an offset should be applied to the version information placement.
public static void PlaceVersion(QRCodeData qrCode, BitArray versionStr, bool offset)
{
var offsetValue = offset ? 4 : 0;
@@ -254,6 +255,7 @@ public static void PlaceDataWords(QRCodeData qrCode, BitArray data, BlockedModul
///
/// Reserves separator areas around the positioning patterns of a QR code to ensure that these crucial areas remain unmodified during data placement.
///
+ /// The version of the QR code, which determines the number of finder patterns.
/// The size of the QR code matrix.
/// A list of rectangles representing areas that must not be overwritten.
public static void ReserveSeperatorAreas(int version, int size, BlockedModules blockedModules)
diff --git a/QRCoder/SvgQRCode.cs b/QRCoder/SvgQRCode.cs
index af668fb8..02531056 100644
--- a/QRCoder/SvgQRCode.cs
+++ b/QRCoder/SvgQRCode.cs
@@ -249,7 +249,14 @@ private string CleanSvgVal(double input)
///
public enum SizingMode
{
+ ///
+ /// Use width and height attributes for SVG sizing
+ ///
WidthHeightAttribute,
+
+ ///
+ /// Use viewBox attribute for SVG sizing
+ ///
ViewBoxAttribute
}
@@ -362,10 +369,17 @@ public string GetDataUri()
///
public enum MediaType : int
{
+ ///
+ /// Portable Network Graphics (PNG) image format
+ ///
#pragma warning disable CS0618 // Type or member is obsolete
[StringValue("image/png")]
#pragma warning restore CS0618 // Type or member is obsolete
PNG = 0,
+
+ ///
+ /// Scalable Vector Graphics (SVG) image format
+ ///
#pragma warning disable CS0618 // Type or member is obsolete
[StringValue("image/svg+xml")]
#pragma warning restore CS0618 // Type or member is obsolete