ApiInformation.IsApiContractPresent ApiInformation.IsApiContractPresent ApiInformation.IsApiContractPresent ApiInformation.IsApiContractPresent ApiInformation.IsApiContractPresent Method

Definition

Overloads

IsApiContractPresent(String, UInt16) IsApiContractPresent(String, UInt16) IsApiContractPresent(String, UInt16) IsApiContractPresent(String, UInt16) IsApiContractPresent(String, UInt16)

Returns true or false to indicate whether the API contract with the specified name and major version number is present.

IsApiContractPresent(String, UInt16, UInt16) IsApiContractPresent(String, UInt16, UInt16) IsApiContractPresent(String, UInt16, UInt16) IsApiContractPresent(String, UInt16, UInt16) IsApiContractPresent(String, UInt16, UInt16)

Returns true or false to indicate whether the API contract with the specified name and major and minor version number is present.

IsApiContractPresent(String, UInt16) IsApiContractPresent(String, UInt16) IsApiContractPresent(String, UInt16) IsApiContractPresent(String, UInt16) IsApiContractPresent(String, UInt16)

Returns true or false to indicate whether the API contract with the specified name and major version number is present.

public : static Platform::Boolean IsApiContractPresent(Platform::String contractName, unsigned short majorVersion)
static bool IsApiContractPresent(winrt::hstring contractName, UInt16 majorVersion) const;
public static bool IsApiContractPresent(String contractName, UInt16 majorVersion)
Public Shared Function IsApiContractPresent(contractName As String, majorVersion As UInt16) As bool
var bool = Windows.Foundation.Metadata.ApiInformation.isApiContractPresent(contractName, majorVersion);

Parameters

contractName
String String String

The name of the API contract.

majorVersion
UInt16 UInt16 UInt16

The major version number of the API contract.

Returns

bool bool bool

True if the specified API contract is present; otherwise, false.

Examples

if (Windows.Foundation.Metadata.ApiInformation.IsApiContractPresent("Windows.ApplicationModel.Calls.CallsVoipContract", 1))
{
    Debug.WriteLine("Windows.ApplicationModel.Calls.CallsVoipContract v1.x found");
}
else
{
    Debug.WriteLine("Windows.ApplicationModel.Calls.CallsVoipContract v1.x NOT found");
}
See also

IsApiContractPresent(String, UInt16, UInt16) IsApiContractPresent(String, UInt16, UInt16) IsApiContractPresent(String, UInt16, UInt16) IsApiContractPresent(String, UInt16, UInt16) IsApiContractPresent(String, UInt16, UInt16)

Returns true or false to indicate whether the API contract with the specified name and major and minor version number is present.

public : static Platform::Boolean IsApiContractPresent(Platform::String contractName, unsigned short majorVersion, unsigned short minorVersion)
static bool IsApiContractPresent(winrt::hstring contractName, UInt16 majorVersion, UInt16 minorVersion) const;
public static bool IsApiContractPresent(String contractName, UInt16 majorVersion, UInt16 minorVersion)
Public Shared Function IsApiContractPresent(contractName As String, majorVersion As UInt16, minorVersion As UInt16) As bool
var bool = Windows.Foundation.Metadata.ApiInformation.isApiContractPresent(contractName, majorVersion, minorVersion);

Parameters

contractName
String String String

The name of the API contract.

majorVersion
UInt16 UInt16 UInt16

The major version number of the API contract.

minorVersion
UInt16 UInt16 UInt16

The minor version number of the API contract.

Returns

bool bool bool

True if the specified API contract is present; otherwise, false.

Examples

if (Windows.Foundation.Metadata.ApiInformation.IsApiContractPresent("Windows.ApplicationModel.Calls.CallsVoipContract", 1, 1))
{
    Debug.WriteLine("Windows.ApplicationModel.Calls.CallsVoipContract v1.1 found");
}
else
{
    Debug.WriteLine("Windows.ApplicationModel.Calls.CallsVoipContract v1.1 NOT found");
}
See also