Udostępnij za pośrednictwem


Metoda ModelComponentCollection.GetItem

Pobiera odwołanie do określonego składnika.

Przestrzeń nazw:  Microsoft.AnalysisServices
Zestaw:  Microsoft.AnalysisServices (w Microsoft.AnalysisServices.dll)

Składnia

'Deklaracja
Protected Function GetItem ( _
    key As String, _
    throwIfNotFound As Boolean, _
    keyPropertyName As String _
) As IModelComponent
'Użycie
Dim key As String
Dim throwIfNotFound As Boolean
Dim keyPropertyName As String
Dim returnValue As IModelComponent

returnValue = Me.GetItem(key, throwIfNotFound, _
    keyPropertyName)
protected IModelComponent GetItem(
    string key,
    bool throwIfNotFound,
    string keyPropertyName
)
protected:
IModelComponent^ GetItem(
    String^ key, 
    bool throwIfNotFound, 
    String^ keyPropertyName
)
member GetItem : 
        key:string * 
        throwIfNotFound:bool * 
        keyPropertyName:string -> IModelComponent 
protected function GetItem(
    key : String, 
    throwIfNotFound : boolean, 
    keyPropertyName : String
) : IModelComponent

Parametry

  • keyPropertyName
    Typ: System.String
    Nazwa IModelComponent właściwość, która zawiera wartości klucz.

Wartość zwracana

Typ: Microsoft.AnalysisServices.IModelComponent
IModelComponent Ma określonego klucz.

Wyjątki

Wyjątek Warunek
ItemNotFoundException

throwIfNotFoundjest zestaw do false i występuje jeden z następujących warunków:

keyzawiera null odniesienia (nic nie w języku Visual Basic.)

- lub -

keynie można odnaleźć w ModelComponentCollection.