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(); }
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(); } }
public override object GetValue(IXmlNode node, IDictionaryAdapter parent, IXmlAccessor accessor) { var source = node.AsRealizable <XmlNode>(); return((source != null && source.Exists) ? source.Value : null); }
public override object GetValue(IXmlNode node, IDictionaryAdapter parent, IXmlAccessor accessor) { var source = node.AsRealizable<XmlNode>(); return (source != null && source.IsReal) ? source.Value : null; }
public bool UnderlyingPositionEquals(IXmlNode node) { var sysXmlNode = node.AsRealizable <XmlNode>(); if (sysXmlNode != null) { return(sysXmlNode.IsReal && sysXmlNode.Value == this.node); } var xPathNode = node.AsRealizable <XPathNavigator>(); if (xPathNode != null) { return(xPathNode.IsReal && xPathNode.Value.UnderlyingObject == this.node); } return(false); }
public bool UnderlyingPositionEquals(IXmlNode node) { #if !SILVERLIGHT var sysXmlNode = node.AsRealizable <XmlNode>(); if (sysXmlNode != null) { return(sysXmlNode.IsReal && sysXmlNode.Value == this.node.UnderlyingObject); } #endif #if SILVERLIGHT // TODO: XNode-based #endif var xPathNode = node.AsRealizable <XPathNavigator>(); if (xPathNode != null) { return(xPathNode.IsReal && xPathNode.Value.IsSamePosition(this.node)); } return(false); }
public void MoveTo(IXmlNode position) { var source = position.AsRealizable <XPathNavigator>(); if (source == null || !source.Exists) { throw Error.CursorCannotMoveToGivenNode(); } var positionNode = source.Value; Reset(); while (MoveNext()) { if (HasCurrent && node.IsSamePosition(positionNode)) { return; } } throw Error.CursorCannotMoveToGivenNode(); }
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(); }
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(); }
public IRealizable <T> AsRealizable <T>() { return(node.AsRealizable <T>()); }
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(); }