Propriedade Schema.AllManagedProperties
Obtém a coleção de ManagedProperty T:Microsoft.Office.Server.Search.Administration.ManagedProperty objetos que representam gerenciado propriedades no esquema de pesquisa para o Shared Service Provider.
Espaço para nome Microsoft.Office.Server.Search.Administration
Conjunto de Módulos (Assembly) Microsoft.Office.Server.Search (em microsoft.office.server.search.dll)
A sintaxe
Public ReadOnly Property AllManagedProperties As ManagedPropertyCollection
Dim instance As Schema
Dim value As ManagedPropertyCollection
value = instance.AllManagedProperties
public ManagedPropertyCollection AllManagedProperties { get; }
A propriedade Value
Um objeto ManagedPropertyCollection T:Microsoft.Office.Server.Search.Administration.ManagedPropertyCollection que representa o gerenciado propriedades no esquema de pesquisa.
Exemplo
O seguinte exemplo de código gravará a lista completa de gerenciado propriedades para o janela do console.
Prerequisites
Certifique-se que um provedor de serviços compartilhados já é criado.
Project References
Adicione o seguinte referências do projeto no seu projeto código do aplicativo console antes execução neste exemplo:
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());
}
}
}
}
Consulte também
Referência
Schema De classe
Schema Membros
Microsoft.Office.Server.Search.Administration De espaço para nome