TermSet.GetTermsWithCustomProperty - Méthode (String, Int32, Boolean)
Obtient une collection d'objets Term avec une propriété avec le nom de propriété fourni.
Espace de noms : Microsoft.SharePoint.Taxonomy
Assembly : Microsoft.SharePoint.Taxonomy (dans Microsoft.SharePoint.Taxonomy.dll)
Syntaxe
'Déclaration
Public Function GetTermsWithCustomProperty ( _
customPropertyName As String, _
resultCollectionSize As Integer, _
trimUnavailable As Boolean _
) As TermCollection
'Utilisation
Dim instance As TermSet
Dim customPropertyName As String
Dim resultCollectionSize As Integer
Dim trimUnavailable As Boolean
Dim returnValue As TermCollection
returnValue = instance.GetTermsWithCustomProperty(customPropertyName, _
resultCollectionSize, trimUnavailable)
public TermCollection GetTermsWithCustomProperty(
string customPropertyName,
int resultCollectionSize,
bool trimUnavailable
)
Paramètres
customPropertyName
Type : System.StringLe nom de propriété personnalisée
resultCollectionSize
Type : System.Int32Le nombre maximal d'objets Term à retourner.
trimUnavailable
Type : System.BooleanValeur booléenne indiquant s'il faut rogner des objets Term qui ont la propriété IsAvailableForTagging la valeur false.
Valeur renvoyée
Type : Microsoft.SharePoint.Taxonomy.TermCollection
Collection d'objets Term avec une propriété avec le nom de propriété fourni.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Le customPropertyName ne peut pas être une référence Null (Rien dans Visual Basic) ou vide. |
ArgumentException | La valeur de customPropertyName n'est pas valide. Probablement, il contient des caractères non valides ou est trop long. |
ArgumentOutOfRangeException | La valeur resultCollectionSize n'est pas valide. Il doit être supérieur à 0. |
Remarques
Si trimUnavailable est true, les objets Term avec la propriété IsAvailableForTagging la valeur false seront réduits à partir des résultats ; sinon tous les termes correspondants seront retournés, quel que soit leur valeur de la propriété IsAvailableForTagging .
Le customPropertyName ne peut pas être une référence Null (Rien dans Visual Basic) ou vide et ne doit pas dépasser 255 caractères.Il ne doit pas contenir les caractères suivants : ;"<>|&tab. La valeur de resultCollectionSize doit être supérieure à 0, la recherche respecte la casse.
Le nombre maximal de résultats renvoyés par cette recherche est limité par le paramètre resultCollectionSize .Pour obtenir les résultats les plus précis, Microsoft recommande l'utilisation de la méthode CommitAll() pour valider les modifications apportées à la base de données avant l'exécution de cette recherche.
Voir aussi
Référence
GetTermsWithCustomProperty - Surcharge
Microsoft.SharePoint.Taxonomy - Espace de noms
GetTermsWithCustomProperty(String, Boolean)
GetTermsWithCustomProperty(String, String, Boolean)
GetTermsWithCustomProperty(String, String, StringMatchOption, Boolean)
GetTermsWithCustomProperty(String, String, StringMatchOption, Int32, Boolean)