SPDocumentParser class
支援的 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
'宣告
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public NotInheritable Class SPDocumentParser _
Inherits SPAutoSerializingObject
'用途
Dim instance As SPDocumentParser
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public sealed class SPDocumentParser : SPAutoSerializingObject
備註
使用SPWebService類別之PluggableParsers屬性可傳回實作 Web 服務中的文件剖析器的集合。
Examples
下列範例會逐一查看文件剖析器中的 Web 服務用來顯示其屬性的集合。
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.
請參閱
參照
Microsoft.SharePoint.Administration namespace