Share via


ManagedPropertyCollection.Item - Propriété

Obtient la propriété gérée spécifiée de la collection de propriétés gérées.

Espace de noms :  Microsoft.Office.Server.Search.Administration
Assembly :  Microsoft.Office.Server.Search (dans Microsoft.Office.Server.Search.dll)

Syntaxe

'Déclaration
Public ReadOnly Default Property Item ( _
    name As String _
) As ManagedProperty
    Get
'Utilisation
Dim instance As ManagedPropertyCollection
Dim name As String
Dim value As ManagedProperty

value = instance(name)
public ManagedProperty this[
    string name
] { get; }

Paramètres

  • name
    Type : System.String

    Chaîne qui spécifie le nom de la propriété gérée.

Valeur de propriété

Type : Microsoft.Office.Server.Search.Administration.ManagedProperty
Un objet ManagedProperty qui représente la propriété gérée.

Exemples

L'exemple de code suivant montre comment utiliser la propriété Item de la classe ManagedPropertyCollection pour extraire un objet ManagedProperty qui représente une propriété gérée spécifique.

using Microsoft.SharePoint;
using Microsoft.Office.Server.Search.Administration;
…
Schema sspSchema = new Schema(SearchContext.GetContext(new SPSite("http://<SiteName>")));
ManagedPropertyCollection properties = sspSchema.AllManagedProperties;
ManagedProperty property = properties["<PropertyName>"];

Voir aussi

Référence

ManagedPropertyCollection classe

ManagedPropertyCollection - Membres

Microsoft.Office.Server.Search.Administration - Espace de noms