本文整理汇总了C#中IXmlNode.Save方法的典型用法代码示例。如果您正苦于以下问题:C# IXmlNode.Save方法的具体用法?C# IXmlNode.Save怎么用?C# IXmlNode.Save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IXmlNode
的用法示例。
在下文中一共展示了IXmlNode.Save方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetValue
public override void SetValue(IXmlNode node, IDictionaryAdapter parent, IXmlAccessor accessor, ref object value)
{
// Require a dictionary adapter
var source = value as IDictionaryAdapter;
if (source == null)
throw Error.NotDictionaryAdapter("value");
// Detect assignment of own value
var sourceAdapter = XmlAdapter.For(source, false);
if (sourceAdapter != null && node.PositionEquals(sourceAdapter.Node))
return;
// Create a fresh component
var targetAdapter = new XmlAdapter(node.Save(), XmlAdapter.For(parent).References);
if (sourceAdapter != null)
targetAdapter.References.UnionWith(sourceAdapter.References);
var component = (IDictionaryAdapter) parent.CreateChildAdapter(node.ClrType, targetAdapter);
// Copy value onto fresh component
source.CopyTo(component);
value = component;
}
示例2: GetValue
public override object GetValue(IXmlNode node, IDictionaryAdapter parent, IXmlAccessor accessor)
{
return GetValueCore(node.Save(), parent, accessor);
}
示例3: GetValue
public override object GetValue(IXmlNode node, IDictionaryAdapter parent, IXmlAccessor accessor)
{
var adapter = new XmlAdapter(node.Save(), XmlAdapter.For(parent).References);
return parent.CreateChildAdapter(node.ClrType, adapter);
}
示例4: Entry
public Entry(IXmlNode node)
{
Node = node.Save();
}