ModelComponentCollection.GetItem Method

Gets

命名空間: Microsoft.AnalysisServices
組件: Microsoft.AnalysisServices (in microsoft.analysisservices.dll)

語法

'宣告
Protected Function GetItem ( _
    key As String, _
    throwIfNotFound As Boolean, _
    keyPropertyName As String _
) As IModelComponent
protected IModelComponent GetItem (
    string key,
    bool throwIfNotFound,
    string keyPropertyName
)
protected:
IModelComponent^ GetItem (
    String^ key, 
    bool throwIfNotFound, 
    String^ keyPropertyName
)
protected IModelComponent GetItem (
    String key, 
    boolean throwIfNotFound, 
    String keyPropertyName
)
protected function GetItem (
    key : String, 
    throwIfNotFound : boolean, 
    keyPropertyName : String
) : IModelComponent

參數

  • throwIfNotFound
    true if ItemNotFoundException should be thrown if the key is not found in the ModelComponentCollection;otherwise, false.
  • keyPropertyName
    The name of the IModelComponent property that provides key values.

傳回值

The IModelComponent that has the specified key.

例外

例外類型 狀況
ItemNotFoundException

throwIfNotFound is set to false and one of the following conditions occurs:

key contains a null reference (Nothing in Visual Basic.)

-or-

key cannot be found in the ModelComponentCollection.

執行緒安全性

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

平台

開發平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

目標平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

請參閱

參考

ModelComponentCollection Class
ModelComponentCollection Members
Microsoft.AnalysisServices Namespace