Schema.AllManagedProperties プロパティ (Microsoft.Office.Server.Search.Administration)
共有サービス プロバイダの検索スキーマにある管理プロパティを表す ManagedProperty オブジェクトのコレクションを取得します。
名前空間: Microsoft.Office.Server.Search.Administration
アセンブリ: Microsoft.Office.Server.Search (microsoft.office.server.search.dll 内)
構文
'宣言
Public ReadOnly Property AllManagedProperties As ManagedPropertyCollection
'使用
Dim instance As Schema
Dim value As ManagedPropertyCollection
value = instance.AllManagedProperties
public ManagedPropertyCollection AllManagedProperties { get; }
プロパティ値
検索スキーマの管理プロパティを表す ManagedPropertyCollection オブジェクト。
例
以下のコード例は、コンソール ウィンドウに管理プロパティの完全なリストを出力します。
Prerequisites
共有サービス プロバイダが既に作成されていることを確認します。
Project References
このサンプルを実行する前に、コンソール アプリケーション コード プロジェクトに以下のプロジェクト参照を追加します。
Microsoft.SharePoint
Microsoft.Office.Server
Microsoft.Office.Server.Search
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Office.Server.Search.Administration;
using Microsoft.SharePoint;
namespace ManagedPropertiesSample
{
class Program
{
static void Main(string[] args)
{
try
{
//Replace <SiteName> with the name of a site using the Shared Service Provider.
string strURL = "http://<SiteName>";
Schema sspSchema = new Schema(SearchContext.GetContext(new SPSite(strURL)));
ManagedPropertyCollection properties = sspSchema.AllManagedProperties;
foreach (ManagedProperty property in properties)
{
Console.WriteLine(property.Name);
}
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString());
}
}
}
}
関連項目
参照
Schema クラス
Schema メンバ
Microsoft.Office.Server.Search.Administration 名前空間