RequiresServiceAttribute 建構函式
初始化 RequiresServiceAttribute 類別的新執行個體。
命名空間: Microsoft.Windows.Design
組件: Microsoft.Windows.Design.Extensibility (在 Microsoft.Windows.Design.Extensibility.dll 中)
語法
'宣告
Public Sub New ( _
serviceType As Type _
)
public RequiresServiceAttribute(
Type serviceType
)
public:
RequiresServiceAttribute(
Type^ serviceType
)
new :
serviceType:Type -> RequiresServiceAttribute
public function RequiresServiceAttribute(
serviceType : Type
)
參數
- serviceType
型別:System.Type
類別所需的服務型別。
備註
這個屬性表示類別必須仰賴指定的服務,而且直到可以使用服務之前,類別都不會具現化。
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。