Compartilhar via


SPDocumentParser class

Classe base que oferece suporte a propriedade promoção e rebaixamento de documentos HTML.

Inheritance hierarchy

System.Object
  Microsoft.SharePoint.Administration.SPAutoSerializingObject
    Microsoft.SharePoint.Administration.SPDocumentParser

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaração
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public NotInheritable Class SPDocumentParser _
    Inherits SPAutoSerializingObject
'Uso
Dim instance As SPDocumentParser
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public sealed class SPDocumentParser : SPAutoSerializingObject

Comentários

Use a propriedade PluggableParsers da classe SPWebService para retornar a coleção de analisadores de documento são implementados em um serviço da Web.

Examples

O exemplo a seguir itera através da coleção de analisadores de documento usado dentro de um serviço da Web para exibir suas propriedades.

Dim webService As New SPWebService("whatever", SPFarm.Local)
Dim myParsers As System.Collections.Generic.Dictionary(Of String, SPDocumentParser) = webService.PluggableParsers
Dim myKeys As System.Collections.Generic.Dictionary(Of String, SPDocumentParser).KeyCollection = myParsers.Keys

Dim key As String

For Each key In myKeys
    Response.Write("Class ID = " & myParsers(key).ClassId.ToString() & " File Extension = " & myParsers(key).FileExtension & " ProgID = " & myParsers(key).ProgId & "<BR>")
Next key
SPWebService webService = new SPWebService("lwswss1", SPFarm.Local);
System.Collections.Generic.Dictionary<string, SPDocumentParser> myParsers = webService.PluggableParsers;
System.Collections.Generic.Dictionary<string, SPDocumentParser>.KeyCollection myKeys = myParsers.Keys;

foreach (string key in myKeys)
{
    Response.Write("Class ID = " + myParsers[key].ClassId.ToString() + " File Extension = " + myParsers[key].FileExtension + " ProgID = " + myParsers[key].ProgId + "<BR>");

Thread safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Ver também

Referência

SPDocumentParser members

Microsoft.SharePoint.Administration namespace

PluggableParsers

Outros recursos

Custom Document Parsers