从托管属性的集合中获取指定的托管的属性。
命名空间: Microsoft.Office.Server.Search.Administration
程序集: Microsoft.Office.Server.Search(位于 Microsoft.Office.Server.Search.dll 中)
语法
声明
Public ReadOnly Default Property Item ( _
name As String _
) As ManagedProperty
Get
用法
Dim instance As ManagedPropertyCollection
Dim name As String
Dim value As ManagedProperty
value = instance(name)
public ManagedProperty this[
string name
] { get; }
参数
name
类型:System.String一个字符串,它指定托管的属性名称。
属性值
类型:Microsoft.Office.Server.Search.Administration.ManagedProperty
ManagedProperty 对象,该对象表示的托管的属性。
示例
下面的代码示例演示如何使用ManagedPropertyCollection类的Item属性来检索一个ManagedProperty对象,该对象表示一个特定的托管的属性。
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>"];