RequiresPreviewFeaturesAttribute 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
表示 API 處於預覽狀態。 這個屬性可讓呼叫月臺標示為診斷,指出已使用預覽功能。 作者可以使用這個屬性在其元件中提供預覽功能。
public ref class RequiresPreviewFeaturesAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Event | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Module | System.AttributeTargets.Property | System.AttributeTargets.Struct, Inherited=false)]
public sealed class RequiresPreviewFeaturesAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Event | System.AttributeTargets.Field | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Module | System.AttributeTargets.Property | System.AttributeTargets.Struct, Inherited=false)>]
type RequiresPreviewFeaturesAttribute = class
inherit Attribute
Public NotInheritable Class RequiresPreviewFeaturesAttribute
Inherits Attribute
- 繼承
- 屬性
備註
RequiresPreviewFeaturesAttribute 標記 API 需預覽功能,需從 .NET 執行環境、核心函式庫及編譯器中取得預覽功能。 此 API 是為平台提供的功能設計,通常不應用於使用者程式碼。
如果你想在自己的函式庫裡提供預覽功能,那就改用 ExperimentalAttribute 吧。
欲了解更多關於將 API 標記為預覽的資訊,請參閱預覽 API。
建構函式
| 名稱 | Description |
|---|---|
| RequiresPreviewFeaturesAttribute() |
初始化 RequiresPreviewFeaturesAttribute 類別的新執行個體。 |
| RequiresPreviewFeaturesAttribute(String) |
初始化一個新的類別實例 RequiresPreviewFeaturesAttribute ,並以指定訊息進行。 |
屬性
| 名稱 | Description |
|---|---|
| Message |
會收到與此屬性實例相關的可選訊息。 |
| TypeId |
在衍生類別中實作時,取得這個 Attribute的唯一標識碼。 (繼承來源 Attribute) |
| Url |
取得或設定與此屬性實例相關的可選 URL。 |
方法
| 名稱 | Description |
|---|---|
| Equals(Object) |
傳回值,這個值表示這個實例是否等於指定的物件。 (繼承來源 Attribute) |
| GetHashCode() |
傳回這個實例的哈希碼。 (繼承來源 Attribute) |
| GetType() |
取得目前實例的 Type。 (繼承來源 Object) |
| IsDefaultAttribute() |
在衍生類別中覆寫時,指出這個實例的值是否為衍生類別的預設值。 (繼承來源 Attribute) |
| Match(Object) |
在衍生類別中覆寫時,傳回值,指出這個實例是否等於指定的物件。 (繼承來源 Attribute) |
| MemberwiseClone() |
建立目前 Object的淺層複本。 (繼承來源 Object) |
| ToString() |
傳回表示目前 物件的字串。 (繼承來源 Object) |