SupportedSimulatorAttribute 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指示指定平台支持 API。 如果指定了版本,则 API 可从指定的 OS 版本开始提供。 可以应用多个属性来指示对多个作系统的支持。
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Enum | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Property, AllowMultiple=true)]
public sealed class SupportedSimulatorAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Enum | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Property, AllowMultiple=true)>]
type SupportedSimulatorAttribute = class
inherit Attribute
- 继承
-
SupportedSimulatorAttribute
- 属性
注解
与标准可用性属性(如 SupportedOSPlatformAttribute 属性)相反,某些平台存在此属性并不意味着对其他平台有任何意义。
如果 API 上没有 SupportedSimulatorAttribute 属性或 UnsupportedSimulatorAttribute 属性,则假定该 API 在模拟器中可用。
如果剪裁了应用,则会剪裁此属性。
构造函数
| 名称 | 说明 |
|---|---|
| SupportedSimulatorAttribute(String) |
初始化新 SupportedSimulatorAttribute 属性。 |
属性
| 名称 | 说明 |
|---|---|
| PlatformName |
平台的名称。 |