C# Class TwoFactorAuthNet.Providers.Qr.BaseHttpQrCodeProvider

Provides a base implementation for QR code providers.
ファイルを表示 Open project: RobThree/TwoFactorAuth.Net

Public Properties

Property Type Description
DEFAULTTIMEOUT System.TimeSpan
USERAGENT string

Protected Methods

Method Description
BaseHttpQrCodeProvider ( Uri baseUri, RemoteCertificateValidationCallback remoteCertificateValidationCallback ) : System

Initializes a new instance of a BaseHttpQrCodeProvider.

Color2Hex ( Color value ) : string

Returns the hexadecimal value for an RGB (Color) value.

DownloadData ( Uri address ) : byte[]

Downloads the resource with the specified Uri as a byte array.

GetWebClient ( ) : WebClient

Creates and returns a WebClient initialized with all default / desired properties already set.

Method Details

BaseHttpQrCodeProvider() protected method

Initializes a new instance of a BaseHttpQrCodeProvider.
Thrown when is null.
protected BaseHttpQrCodeProvider ( Uri baseUri, RemoteCertificateValidationCallback remoteCertificateValidationCallback ) : System
baseUri System.Uri The base Uri for the QR code provider.
remoteCertificateValidationCallback RemoteCertificateValidationCallback /// The to be used by the QR code provider. ///
return System

Color2Hex() protected static method

Returns the hexadecimal value for an RGB (Color) value.
protected static Color2Hex ( Color value ) : string
value Color The to convert.
return string

DownloadData() protected method

Downloads the resource with the specified Uri as a byte array.
protected DownloadData ( Uri address ) : byte[]
address System.Uri The URI represented by the object, from which to download data.
return byte[]

GetWebClient() protected method

Creates and returns a WebClient initialized with all default / desired properties already set.
protected GetWebClient ( ) : WebClient
return System.Net.WebClient

Property Details

DEFAULTTIMEOUT public_oe static_oe property

Gets the default timeout for downloading QR codes.
public static TimeSpan,System DEFAULTTIMEOUT
return System.TimeSpan

USERAGENT public_oe static_oe property

Gets the useragent string used to identify when downloading QR codes.
public static string USERAGENT
return string