SPDocumentParser 类
支持 HTML 文档属性升级和降级的基类。
继承层次结构
System.Object
Microsoft.SharePoint.Administration.SPAutoSerializingObject
Microsoft.SharePoint.Administration.SPDocumentParser
命名空间: Microsoft.SharePoint.Administration
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
<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 服务中实现的文档分析程序的集合。
示例
下面的示例循环访问文档分析器用于 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>");
线程安全性
该类型的任何公共 静态 (已共享 在 Visual Basic 中) 成员都是线程安全的。不保证任何实例成员都是线程安全的。
另请参阅
引用
Microsoft.SharePoint.Administration 命名空间