ExternalMarkupService.Save 方法
[本文档仅供预览,在以后的发行版中可能会发生更改。包含的空白主题用作占位符。]
当在派生类中重写时,将指定的模型项序列化为表示该模型项的具有正确格式的标记文本。
命名空间: Microsoft.Windows.Design.Services
程序集: Microsoft.Windows.Design.Interaction(在 Microsoft.Windows.Design.Interaction.dll 中)
语法
声明
Public MustOverride Function Save ( _
root As ModelItem, _
<OutAttribute> ByRef requiredAssemblies As IEnumerable(Of AssemblyName) _
) As String
public abstract string Save(
ModelItem root,
out IEnumerable<AssemblyName> requiredAssemblies
)
public:
virtual String^ Save(
ModelItem^ root,
[OutAttribute] IEnumerable<AssemblyName^>^% requiredAssemblies
) abstract
abstract Save :
root:ModelItem *
requiredAssemblies:IEnumerable<AssemblyName> byref -> string
public abstract function Save(
root : ModelItem,
requiredAssemblies : IEnumerable<AssemblyName>
) : String
参数
- root
类型:Microsoft.Windows.Design.Model.ModelItem
表示该文档的根的模型项。
- requiredAssemblies
类型:System.Collections.Generic.IEnumerable<AssemblyName>%
此子树所需的程序集引用。
返回值
类型:System.String
表示该模型项的标记文本。
异常
异常 | 条件 |
---|---|
ArgumentNullException | root 为 nulla null reference (Nothing in Visual Basic)。 |
备注
当返回对 Save 方法的调用时,requiredAssemblies 包含解析此子树中的全部类型所必要的程序集引用。 Load 方法可以使用这个集并添加所需到引用中。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。
请参见
参考
Microsoft.Windows.Design.Services 命名空间