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
key
Type: System.StringThe key of the IModelComponent to get from the ModelComponentCollection.
throwIfNotFound
Type: System.Booleantrue if Exception should be thrown if the key is not found in the ModelComponentCollection;otherwise, false.
keyPropertyName
Type: System.StringThe name of the IModelComponent property that provides key values.
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