本文整理汇总了C#中IXmlNode.AsRealizable方法的典型用法代码示例。如果您正苦于以下问题:C# IXmlNode.AsRealizable方法的具体用法?C# IXmlNode.AsRealizable怎么用?C# IXmlNode.AsRealizable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IXmlNode
的用法示例。
在下文中一共展示了IXmlNode.AsRealizable方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetValue
public override object GetValue(IXmlNode node, IDictionaryAdapter parent, IXmlAccessor accessor)
{
var source = node.AsRealizable<XmlNode>();
return (source != null && source.IsReal)
? source.Value
: null;
}
示例2: MoveTo
public void MoveTo(IXmlNode position)
{
var source = position.AsRealizable<XmlNode>();
if (source == null || !source.IsReal)
throw Error.CursorCannotMoveToGivenNode();
IXmlKnownType knownType;
if (!knownTypes.TryGet(position, out knownType))
throw Error.CursorCannotMoveToGivenNode();
node = source.Value;
type = knownType.ClrType;
if (IsElement)
SetMovedToElement();
else
SetMovedToAttribute();
}
示例3: MoveTo
public void MoveTo(IXmlNode position)
{
var source = position.AsRealizable<XPathNavigator>();
if (source == null || !source.IsReal)
throw Error.CursorCannotMoveToGivenNode();
var positionNode = source.Value;
Reset();
while (MoveNext())
if (HasCurrent && node.IsSamePosition(positionNode))
return;
throw Error.CursorCannotMoveToGivenNode();
}
示例4: MoveTo
public void MoveTo(IXmlNode position)
{
var source = position.AsRealizable<XPathNavigator>();
if (source == null || !source.IsReal)
throw Error.CursorCannotMoveToGivenNode();
var positionNode = source.Value;
Reset();
if (iterator != null)
while (iterator.MoveNext())
if (iterator.Current.IsSamePosition(positionNode))
{ SetAtNext(); return; }
throw Error.CursorCannotMoveToGivenNode();
}