QRCodeConsoleRenderer Class
Provides methods to render a QR code using Unicode block characters.
public static class QRCodeConsoleRendererMethods
| Name | Description |
|---|---|
| ToConsoleString(QRCode, ConsoleRenderOptions?) | Renders the QR code as a string using Unicode block characters, two rows of modules per line. |
| WriteTo(QRCode, TextWriter, ConsoleRenderOptions?) | Renders the QR code to a TextWriter using Unicode block characters. |
| WriteToConsole(QRCode, ConsoleRenderOptions?) | Renders the QR code to Console.Out. |
ToConsoleString(QRCode, ConsoleRenderOptions?)
QRCodeConsoleRenderer.csRenders the QR code as a string using Unicode block characters, two rows of modules per line.
public static string ToConsoleString(this QRCode qrCode, ConsoleRenderOptions? options = null)Parameters
qrCodeQRCode- The QR code to render.
optionsConsoleRenderOptions?- The rendering options, or
nullfor the defaults.
Returns
string The lines of the QR code, without trailing spaces and without a final new line.
Exceptions
ArgumentNullExceptionqrCodeisnull.ArgumentOutOfRangeException- An option is out of range, or the text is too large for a string.
WriteTo(QRCode, TextWriter, ConsoleRenderOptions?)
QRCodeConsoleRenderer.csRenders the QR code to a TextWriter using Unicode block characters.
public static void WriteTo(this QRCode qrCode, TextWriter writer, ConsoleRenderOptions? options = null)Parameters
qrCodeQRCode- The QR code to render.
writerTextWriter- The destination.
optionsConsoleRenderOptions?- The rendering options, or
nullfor the defaults.
Exceptions
ArgumentNullExceptionqrCodeorwriterisnull.ArgumentOutOfRangeException- An option is out of range, or the text is too large for a string.
WriteToConsole(QRCode, ConsoleRenderOptions?)
QRCodeConsoleRenderer.csRenders the QR code to Console.Out.
public static void WriteToConsole(this QRCode qrCode, ConsoleRenderOptions? options = null)Parameters
qrCodeQRCode- The QR code to render.
optionsConsoleRenderOptions?- The rendering options, or
nullfor the defaults.
Exceptions
ArgumentNullExceptionqrCodeisnull.ArgumentOutOfRangeException- An option is out of range, or the text is too large for a string.