C# Class TwoFactorAuthNet.Providers.Qr.QRicketQrCodeProvider

Provides QR codes generated by QRickit.
Inheritance: BaseHttpQrCodeProvider, IQrCodeProvider
Show file Open project: RobThree/TwoFactorAuth.Net

Public Methods

Method Description
GetMimeType ( ) : string

Gets the MIME type of the image.

GetQrCodeImage ( string text, int size ) : byte[]

Downloads / retrieves / generates a QR code as image.

QRicketQrCodeProvider ( ) : System

Initializes a new instance of a QRicketQrCodeProvider with the default ErrorCorrectionLevel (F:TwoFactorAuthNet.Providers.Qr.ErrorCorrectionLevel.Low), BackgroundColor (Color.White), ForegroundColor (Color.Black), ImageFormat (QRicketImageFormat.Png) and RemoteCertificateValidationCallback.

QRicketQrCodeProvider ( ErrorCorrectionLevel errorCorrectionLevel ) : System

Initializes a new instance of a QRicketQrCodeProvider with the specified ErrorCorrectionLevel and default BackgroundColor (Color.White), ForegroundColor (Color.Black), ImageFormat (QRicketImageFormat.Png) and RemoteCertificateValidationCallback.

QRicketQrCodeProvider ( ErrorCorrectionLevel errorCorrectionLevel, Color backgroundColor ) : System

Initializes a new instance of a QRicketQrCodeProvider with the specified ErrorCorrectionLevel, BackgroundColor and default ForegroundColor (Color.Black), ImageFormat (QRicketImageFormat.Png) and RemoteCertificateValidationCallback.

QRicketQrCodeProvider ( ErrorCorrectionLevel errorCorrectionLevel, Color backgroundColor, Color foregroundColor ) : System

Initializes a new instance of a QRicketQrCodeProvider with the specified ErrorCorrectionLevel, BackgroundColor, ForegroundColor and default QRicketImageFormat">ImageFormat (RemoteCertificateValidationCallback.

QRicketQrCodeProvider ( ErrorCorrectionLevel errorCorrectionLevel, Color backgroundColor, Color foregroundColor, QRicketImageFormat imageFormat ) : System

Initializes a new instance of a QRicketQrCodeProvider with the specified ErrorCorrectionLevel, BackgroundColor, ForegroundColor, ImageFormat and default RemoteCertificateValidationCallback.

QRicketQrCodeProvider ( ErrorCorrectionLevel errorCorrectionLevel, Color backgroundColor, Color foregroundColor, QRicketImageFormat imageFormat, RemoteCertificateValidationCallback remoteCertificateValidationCallback ) : System

Initializes a new instance of a QRicketQrCodeProvider with the specified ErrorCorrectionLevel, BackgroundColor, ForegroundColor, QRicketImageFormat">ImageFormat and

Private Methods

Method Description
GetUri ( string qrText, int size ) : Uri

Builds an Uri based on the instance's BaseHttpQrCodeProvider.BaseUri.

Method Details

GetMimeType() public method

Gets the MIME type of the image.
/// Thrown when an unknown is used. ///
public GetMimeType ( ) : string
return string

GetQrCodeImage() public method

Downloads / retrieves / generates a QR code as image.
public GetQrCodeImage ( string text, int size ) : byte[]
text string The text to encode in the QR code.
size int The desired size (width and height equal) for the image.
return byte[]

QRicketQrCodeProvider() public method

Initializes a new instance of a QRicketQrCodeProvider with the default ErrorCorrectionLevel (F:TwoFactorAuthNet.Providers.Qr.ErrorCorrectionLevel.Low), BackgroundColor (Color.White), ForegroundColor (Color.Black), ImageFormat (QRicketImageFormat.Png) and RemoteCertificateValidationCallback.
public QRicketQrCodeProvider ( ) : System
return System

QRicketQrCodeProvider() public method

Initializes a new instance of a QRicketQrCodeProvider with the specified ErrorCorrectionLevel and default BackgroundColor (Color.White), ForegroundColor (Color.Black), ImageFormat (QRicketImageFormat.Png) and RemoteCertificateValidationCallback.
public QRicketQrCodeProvider ( ErrorCorrectionLevel errorCorrectionLevel ) : System
errorCorrectionLevel ErrorCorrectionLevel The to use when generating QR codes.
return System

QRicketQrCodeProvider() public method

Initializes a new instance of a QRicketQrCodeProvider with the specified ErrorCorrectionLevel, BackgroundColor and default ForegroundColor (Color.Black), ImageFormat (QRicketImageFormat.Png) and RemoteCertificateValidationCallback.
public QRicketQrCodeProvider ( ErrorCorrectionLevel errorCorrectionLevel, Color backgroundColor ) : System
errorCorrectionLevel ErrorCorrectionLevel The to use when generating QR codes.
backgroundColor Color The background color to be used for the QR code.
return System

QRicketQrCodeProvider() public method

Initializes a new instance of a QRicketQrCodeProvider with the specified ErrorCorrectionLevel, BackgroundColor, ForegroundColor and default QRicketImageFormat">ImageFormat (RemoteCertificateValidationCallback.
public QRicketQrCodeProvider ( ErrorCorrectionLevel errorCorrectionLevel, Color backgroundColor, Color foregroundColor ) : System
errorCorrectionLevel ErrorCorrectionLevel The to use when generating QR codes.
backgroundColor Color The background color to be used for the QR code.
foregroundColor Color The foreground color to be used for the QR code.
return System

QRicketQrCodeProvider() public method

Initializes a new instance of a QRicketQrCodeProvider with the specified ErrorCorrectionLevel, BackgroundColor, ForegroundColor, ImageFormat and default RemoteCertificateValidationCallback.
public QRicketQrCodeProvider ( ErrorCorrectionLevel errorCorrectionLevel, Color backgroundColor, Color foregroundColor, QRicketImageFormat imageFormat ) : System
errorCorrectionLevel ErrorCorrectionLevel The to use when generating QR codes.
backgroundColor Color The background color to be used for the QR code.
foregroundColor Color The foreground color to be used for the QR code.
imageFormat QRicketImageFormat The of the QR code.
return System

QRicketQrCodeProvider() public method

Initializes a new instance of a QRicketQrCodeProvider with the specified ErrorCorrectionLevel, BackgroundColor, ForegroundColor, QRicketImageFormat">ImageFormat and
/// Thrown when an invalid or is specified. ///
public QRicketQrCodeProvider ( ErrorCorrectionLevel errorCorrectionLevel, Color backgroundColor, Color foregroundColor, QRicketImageFormat imageFormat, RemoteCertificateValidationCallback remoteCertificateValidationCallback ) : System
errorCorrectionLevel ErrorCorrectionLevel The to use when generating QR codes.
backgroundColor Color The background color to be used for the QR code.
foregroundColor Color The foreground color to be used for the QR code.
imageFormat QRicketImageFormat The of the QR code.
remoteCertificateValidationCallback RemoteCertificateValidationCallback /// The to use when generating QR codes. ///
return System