ApiInformation ApiInformation ApiInformation ApiInformation Class

Definition

Enables you to detect whether a specified member, type, or API contract is present so that you can safely make API calls across a variety of devices.

public : static class ApiInformationpublic static class ApiInformationPublic Static Class ApiInformation// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.FoundationContract (introduced v1)

Methods

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)public static bool IsApiContractPresent(String contractName, UInt16 majorVersion)Public Static Function IsApiContractPresent(contractName As String, majorVersion As UInt16) As bool// You can use this method in JavaScript.
Parameters
contractName
PlatForm::String String String String

The name of the API contract.

majorVersion
unsigned short UInt16 UInt16 UInt16

The major version number of the API contract.

Returns
PlatForm::Boolean bool bool bool

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

See Also

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)public static bool IsApiContractPresent(String contractName, UInt16 majorVersion, UInt16 minorVersion)Public Static Function IsApiContractPresent(contractName As String, majorVersion As UInt16, minorVersion As UInt16) As bool// You can use this method in JavaScript.
Parameters
contractName
PlatForm::String String String String

The name of the API contract.

majorVersion
unsigned short UInt16 UInt16 UInt16

The major version number of the API contract.

minorVersion
unsigned short UInt16 UInt16 UInt16

The minor version number of the API contract.

Returns
PlatForm::Boolean bool bool bool

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

See Also

IsEnumNamedValuePresent(String, String) IsEnumNamedValuePresent(String, String) IsEnumNamedValuePresent(String, String) IsEnumNamedValuePresent(String, String)

Returns true or false to indicate whether a specified named constant is present for a specified enumeration.

public : static PlatForm::Boolean IsEnumNamedValuePresent(PlatForm::String enumTypeName, PlatForm::String valueName)public static bool IsEnumNamedValuePresent(String enumTypeName, String valueName)Public Static Function IsEnumNamedValuePresent(enumTypeName As String, valueName As String) As bool// You can use this method in JavaScript.
Parameters
enumTypeName
PlatForm::String String String String

The namespace-qualified name of the type.

valueName
PlatForm::String String String String

The name of the constant.

Returns
PlatForm::Boolean bool bool bool

True if the specified constant is present; otherwise, false.

IsEventPresent(String, String) IsEventPresent(String, String) IsEventPresent(String, String) IsEventPresent(String, String)

Returns true or false to indicate whether a specified event is present for a specified type.

public : static PlatForm::Boolean IsEventPresent(PlatForm::String typeName, PlatForm::String eventName)public static bool IsEventPresent(String typeName, String eventName)Public Static Function IsEventPresent(typeName As String, eventName As String) As bool// You can use this method in JavaScript.
Parameters
typeName
PlatForm::String String String String

The namespace-qualified name of the type.

eventName
PlatForm::String String String String

The name of the event.

Returns
PlatForm::Boolean bool bool bool

True if the specified event is present for the type; otherwise, false.

IsMethodPresent(String, String) IsMethodPresent(String, String) IsMethodPresent(String, String) IsMethodPresent(String, String)

Returns true or false to indicate whether a specified method is present for a specified type.

public : static PlatForm::Boolean IsMethodPresent(PlatForm::String typeName, PlatForm::String methodName)public static bool IsMethodPresent(String typeName, String methodName)Public Static Function IsMethodPresent(typeName As String, methodName As String) As bool// You can use this method in JavaScript.
Parameters
typeName
PlatForm::String String String String

The namespace-qualified name of the type.

methodName
PlatForm::String String String String

The name of the method.

Returns
PlatForm::Boolean bool bool bool

True if the specified method is present for the type; otherwise, false.

See Also

IsMethodPresent(String, String, UInt32) IsMethodPresent(String, String, UInt32) IsMethodPresent(String, String, UInt32) IsMethodPresent(String, String, UInt32)

Returns true or false to indicate whether a specified method overload with the specified number of input parameters is present for a specified type.

public : static PlatForm::Boolean IsMethodPresent(PlatForm::String typeName, PlatForm::String methodName, unsigned int inputParameterCount)public static bool IsMethodPresent(String typeName, String methodName, UInt32 inputParameterCount)Public Static Function IsMethodPresent(typeName As String, methodName As String, inputParameterCount As UInt32) As bool// You can use this method in JavaScript.
Parameters
typeName
PlatForm::String String String String

The namespace-qualified name of the type.

methodName
PlatForm::String String String String

The name of the method.

inputParameterCount
unsigned int UInt32 UInt32 UInt32

The number of input parameters for the overload.

Returns
PlatForm::Boolean bool bool bool

True if the specified method is present for the type; otherwise, false.

See Also

IsPropertyPresent(String, String) IsPropertyPresent(String, String) IsPropertyPresent(String, String) IsPropertyPresent(String, String)

Returns true or false to indicate whether a specified property (writeable or read-only) is present for a specified type.

public : static PlatForm::Boolean IsPropertyPresent(PlatForm::String typeName, PlatForm::String propertyName)public static bool IsPropertyPresent(String typeName, String propertyName)Public Static Function IsPropertyPresent(typeName As String, propertyName As String) As bool// You can use this method in JavaScript.
Parameters
typeName
PlatForm::String String String String

The namespace-qualified name of the type.

propertyName
PlatForm::String String String String

The name of the property.

Returns
PlatForm::Boolean bool bool bool

True if the specified property is present for the type; otherwise, false.

IsReadOnlyPropertyPresent(String, String) IsReadOnlyPropertyPresent(String, String) IsReadOnlyPropertyPresent(String, String) IsReadOnlyPropertyPresent(String, String)

Returns true or false to indicate whether a specified read-only property is present for a specified type.

public : static PlatForm::Boolean IsReadOnlyPropertyPresent(PlatForm::String typeName, PlatForm::String propertyName)public static bool IsReadOnlyPropertyPresent(String typeName, String propertyName)Public Static Function IsReadOnlyPropertyPresent(typeName As String, propertyName As String) As bool// You can use this method in JavaScript.
Parameters
typeName
PlatForm::String String String String

The namespace-qualified name of the type.

propertyName
PlatForm::String String String String

The name of the property.

Returns
PlatForm::Boolean bool bool bool

True if the specified property is present for the type; otherwise, false.

IsTypePresent(String) IsTypePresent(String) IsTypePresent(String) IsTypePresent(String)

Returns true or false to indicate whether a specified type is present.

public : static PlatForm::Boolean IsTypePresent(PlatForm::String typeName)public static bool IsTypePresent(String typeName)Public Static Function IsTypePresent(typeName As String) As bool// You can use this method in JavaScript.
Parameters
typeName
PlatForm::String String String String

The namespace-qualified name of the type.

Returns
PlatForm::Boolean bool bool bool

True if the specified type is present; otherwise, false.

IsWriteablePropertyPresent(String, String) IsWriteablePropertyPresent(String, String) IsWriteablePropertyPresent(String, String) IsWriteablePropertyPresent(String, String)

Returns true or false to indicate whether a specified writeable property is present for a specified type.

public : static PlatForm::Boolean IsWriteablePropertyPresent(PlatForm::String typeName, PlatForm::String propertyName)public static bool IsWriteablePropertyPresent(String typeName, String propertyName)Public Static Function IsWriteablePropertyPresent(typeName As String, propertyName As String) As bool// You can use this method in JavaScript.
Parameters
typeName
PlatForm::String String String String

The namespace-qualified name of the type.

propertyName
PlatForm::String String String String

The name of the property.

Returns
PlatForm::Boolean bool bool bool

True if the specified property is present for the type; otherwise, false.