共用方式為


ModelExists 方法

Checks for a matching model by name and/or ID.

命名空間:  Microsoft.MasterDataServices.Deployment
組件:  Microsoft.MasterDataServices.Deployment (在 Microsoft.MasterDataServices.Deployment.dll 中)

語法

'宣告
Public Function ModelExists ( _
    targetModelId As Identifier, _
    <OutAttribute> ByRef isNameMatch As Boolean, _
    <OutAttribute> ByRef isIdMatch As Boolean _
) As Boolean
'用途
Dim instance As ModelReader
Dim targetModelId As Identifier
Dim isNameMatch As Boolean
Dim isIdMatch As Boolean
Dim returnValue As Boolean

returnValue = instance.ModelExists(targetModelId, _
    isNameMatch, isIdMatch)
public bool ModelExists(
    Identifier targetModelId,
    out bool isNameMatch,
    out bool isIdMatch
)
public:
bool ModelExists(
    Identifier^ targetModelId, 
    [OutAttribute] bool% isNameMatch, 
    [OutAttribute] bool% isIdMatch
)
member ModelExists : 
        targetModelId:Identifier * 
        isNameMatch:bool byref * 
        isIdMatch:bool byref -> bool 
public function ModelExists(
    targetModelId : Identifier, 
    isNameMatch : boolean, 
    isIdMatch : boolean
) : boolean

參數

  • isNameMatch
    型別:System. . :: . .Boolean%
    When this method returns, contains true if a name was passed in, and the name has a match; otherwise, false. This parameter is passed uninitialized.
  • isIdMatch
    型別:System. . :: . .Boolean%
    When this method returns, contains true if an ID was passed in, and the ID has a match; otherwise, false. This parameter is passed uninitialized.

傳回值

型別:System. . :: . .Boolean
true if there is a model that matches targetModelId (in accordance with the conditions stated above); otherwise, false.

備註

Note that both of the out parameters can be true and the result false, if the name and ID both match, but they match different models.

ModelExists throws ArgumentNullException if targetModelId is null Nothing nullptr unit null 參考 (在 Visual Basic 中為 Nothing) .

ModelExists throws ArgumentException if neither a name nor an ID was provided. At least one of those must be given.