C# Class Helpers, SmallestDotNet

Class Helpers provides some static utility functions.
显示文件 Open project: shanselman/SmallestDotNet Class Usage Examples

Public Methods

Method Description
GetJsonPayload ( String UserAgent ) : string
GetUpdateInformation ( string userAgent ) : UpdateInformationResponse
GetUpdateInformation ( string UserAgent, string realVersion ) : UpdateInformationResponse
GetUpdateInformation ( string UserAgent, string realVersion, int releaseKey ) : UpdateInformationResponse
Has10 ( String UserAgent ) : bool

Determines if the User Agent String indicates .NET 1.0

Has11 ( String UserAgent ) : bool

Determines if the User Agent String indicates .NET 1.1

Has20 ( String UserAgent ) : bool

Determines if the User Agent String indicates .NET 2.0

Has30 ( String UserAgent ) : bool

Determines if the User Agent String indicates .NET 3.0

Has35 ( String UserAgent ) : bool

Determines if the User Agent String indicates .NET 3.5

Has35SP1C ( String UserAgent ) : bool

Determines if the User Agent String indicates .NET 3.5 SP1 Client

Has35SP1E ( String UserAgent ) : bool

Determines if the User Agent String indicates .NET 3.5 SP1 Full

Has40C ( String UserAgent ) : bool

Determines if the User Agent String indicates .NET 40 Client

Has40E ( String UserAgent ) : bool

Determines if the User Agent String indicates .NET 4.0 Full

Has45 ( String UserAgent ) : bool
HasWindows10 ( string userAgent ) : bool

Determines if the User Agent String indicates Windows 8

HasWindows8 ( String userAgent ) : bool

Determines if the User Agent String indicates Windows 8

Private Methods

Method Description
CheckDotNet3_5UnSupportedOs ( string UserAgent, string agent, string friendlyName ) : string
CheckVersionLatest ( string realVersion, string &netInfoString ) : bool
DotNet1Message ( bool hasDotNet4 ) : string
DotNet2Message ( bool hasDotNet4 ) : string
DotNet3Message ( bool hasDotNet4 ) : string
DotNet3_5Message ( bool hasSp1, bool hasDotNet4 ) : string
Get40Message ( string UserAgent, string &userMessage ) : bool
GetDotnetVersionFromReleaseKey ( int releaseKey, bool &exact ) : string

Gets the .Net version based on release key.

GetRealVersionMessage ( string &realVersion, int releaseKey ) : string

Gets a message based on the "real" version as determined by the .Net Checker application.

GetWindows8Or10Message ( string userAgent, string &userMessage ) : bool

Gets a message for the Windows 8 OS.

MessageForBrowser ( string browser ) : string
UnknownBrowserMessage ( ) : string

Method Details

GetJsonPayload() public static method

public static GetJsonPayload ( String UserAgent ) : string
UserAgent String
return string

GetUpdateInformation() public static method

public static GetUpdateInformation ( string userAgent ) : UpdateInformationResponse
userAgent string
return UpdateInformationResponse

GetUpdateInformation() public static method

public static GetUpdateInformation ( string UserAgent, string realVersion ) : UpdateInformationResponse
UserAgent string
realVersion string
return UpdateInformationResponse

GetUpdateInformation() public static method

public static GetUpdateInformation ( string UserAgent, string realVersion, int releaseKey ) : UpdateInformationResponse
UserAgent string
realVersion string
releaseKey int
return UpdateInformationResponse

Has10() public static method

Determines if the User Agent String indicates .NET 1.0
public static Has10 ( String UserAgent ) : bool
UserAgent String A User Agent String
return bool

Has11() public static method

Determines if the User Agent String indicates .NET 1.1
public static Has11 ( String UserAgent ) : bool
UserAgent String A User Agent String
return bool

Has20() public static method

Determines if the User Agent String indicates .NET 2.0
public static Has20 ( String UserAgent ) : bool
UserAgent String A User Agent String
return bool

Has30() public static method

Determines if the User Agent String indicates .NET 3.0
public static Has30 ( String UserAgent ) : bool
UserAgent String A User Agent String
return bool

Has35() public static method

Determines if the User Agent String indicates .NET 3.5
public static Has35 ( String UserAgent ) : bool
UserAgent String A User Agent String
return bool

Has35SP1C() public static method

Determines if the User Agent String indicates .NET 3.5 SP1 Client
public static Has35SP1C ( String UserAgent ) : bool
UserAgent String A User Agent String
return bool

Has35SP1E() public static method

Determines if the User Agent String indicates .NET 3.5 SP1 Full
public static Has35SP1E ( String UserAgent ) : bool
UserAgent String A User Agent String
return bool

Has40C() public static method

Determines if the User Agent String indicates .NET 40 Client
public static Has40C ( String UserAgent ) : bool
UserAgent String A User Agent String
return bool

Has40E() public static method

Determines if the User Agent String indicates .NET 4.0 Full
public static Has40E ( String UserAgent ) : bool
UserAgent String A User Agent String
return bool

Has45() public static method

public static Has45 ( String UserAgent ) : bool
UserAgent String
return bool

HasWindows10() public static method

Determines if the User Agent String indicates Windows 8
public static HasWindows10 ( string userAgent ) : bool
userAgent string A User Agent String
return bool

HasWindows8() public static method

Determines if the User Agent String indicates Windows 8
public static HasWindows8 ( String userAgent ) : bool
userAgent String A User Agent String
return bool