Share via


ModelComponentCollection.GetItem Method (String, Boolean, String)

 

Applies To: SQL Server (starting with 2016)

Gets a reference to the specified component.

Namespace:   Microsoft.AnalysisServices
Assembly:  Microsoft.AnalysisServices.Core (in Microsoft.AnalysisServices.Core.dll)

Syntax

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 As String,
    throwIfNotFound As Boolean,
    keyPropertyName As String
) As IModelComponent

Parameters

Return Value

Type: Microsoft.AnalysisServices.IModelComponent

The IModelComponent that has the specified key.

Exceptions

Exception Condition
Exception

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.

See Also

ModelComponentCollection Class
Microsoft.AnalysisServices Namespace

Return to top