PreviousContractVersionAttribute 类

定义

指示类型以前与不同的 API 协定相关联。

public ref class PreviousContractVersionAttribute sealed : Attribute
/// [Windows.Foundation.Metadata.AllowMultiple]
/// [Windows.Foundation.Metadata.AttributeUsage(System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Event | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.InterfaceImpl | System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.RuntimeClass | System.AttributeTargets.Struct)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.FoundationContract, 65536)]
class PreviousContractVersionAttribute final : Attribute
[Windows.Foundation.Metadata.AllowMultiple]
[Windows.Foundation.Metadata.AttributeUsage(System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Event | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.InterfaceImpl | System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.RuntimeClass | System.AttributeTargets.Struct)]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.FoundationContract), 65536)]
public sealed class PreviousContractVersionAttribute : Attribute
function PreviousContractVersionAttribute(contract, versionLow, versionHigh, newContract)
Public NotInheritable Class PreviousContractVersionAttribute
Inherits Attribute
继承
PreviousContractVersionAttribute
属性

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 中引入)
API contract
Windows.Foundation.FoundationContract (在 v1.0 中引入)

注解

如果类型已从一个 API 协定移动到另一种类型,则此属性存在。 它表示类型相对于其已存在的 API 协定的历史记录。

构造函数

PreviousContractVersionAttribute(String, UInt32, UInt32, String)

创建并初始化 特性的新实例。

PreviousContractVersionAttribute(String, UInt32, UInt32)

创建并初始化 特性的新实例。

PreviousContractVersionAttribute(Type, UInt32, UInt32, Type)

创建并初始化 特性的新实例。

PreviousContractVersionAttribute(Type, UInt32, UInt32)

创建并初始化 特性的新实例。

适用于