예제 #1
0
        public XPathMutableCursor(IXmlNode parent, CompiledXPath path,
                                  IXmlIncludedTypeMap knownTypes, IXmlNamespaceSource namespaces, CursorFlags flags)
            : base(path, namespaces, parent)
        {
            if (null == parent)
            {
                throw Error.ArgumentNull("parent");
            }
            if (null == path)
            {
                throw Error.ArgumentNull("path");
            }
            if (null == knownTypes)
            {
                throw Error.ArgumentNull("knownTypes");
            }
            if (!path.IsCreatable)
            {
                throw Error.XPathNotCreatable(path);
            }

            this.step       = path.FirstStep;
            this.knownTypes = knownTypes;
            this.flags      = flags;

            var source = parent.RequireRealizable <XPathNavigator>();

            if (source.IsReal)
            {
                iterator = new XPathBufferedNodeIterator(
                    source.Value.Select(path.FirstStep.Path));
            }
        }
예제 #2
0
파일: SysXmlCursor.cs 프로젝트: belav/Core
        public SysXmlCursor(
            IXmlNode parent,
            IXmlKnownTypeMap knownTypes,
            IXmlNamespaceSource namespaces,
            CursorFlags flags
            ) : base(namespaces, parent)
        {
            if (null == parent)
            {
                throw Error.ArgumentNull(nameof(parent));
            }
            if (null == knownTypes)
            {
                throw Error.ArgumentNull(nameof(knownTypes));
            }

            this.knownTypes = knownTypes;
            this.flags      = flags;
            this.index      = -1;

            var source = parent.RequireRealizable <XmlNode>();

            if (source.IsReal)
            {
                node = source.Value;
            }
        }
예제 #3
0
		public SysXmlSubtreeIterator(IXmlNode parent, IXmlNamespaceSource namespaces)
			: base(namespaces, parent)
		{
			if (null == parent)
				throw Error.ArgumentNull("parent");

			var source = parent.RequireRealizable<XmlNode>();
			if (source.IsReal)
				node = source.Value;

			type = typeof(object);
		}
예제 #4
0
		public SysXmlCursor(IXmlNode parent, IXmlKnownTypeMap knownTypes, IXmlNamespaceSource namespaces, CursorFlags flags)
			: base(namespaces, parent)
		{
			if (null == parent)
				throw Error.ArgumentNull("parent");
			if (null == knownTypes)
				throw Error.ArgumentNull("knownTypes");

			this.knownTypes = knownTypes;
			this.flags      = flags;
			this.index      = -1;

			var source = parent.RequireRealizable<XmlNode>();
			if (source.IsReal)
				node = source.Value;
		}
예제 #5
0
        public SysXmlSubtreeIterator(IXmlNode parent, IXmlNamespaceSource namespaces)
            : base(namespaces, parent)
        {
            if (null == parent)
            {
                throw Error.ArgumentNull(nameof(parent));
            }

            var source = parent.RequireRealizable <XmlNode>();

            if (source.IsReal)
            {
                node = source.Value;
            }

            type = typeof(object);
        }
예제 #6
0
		public XPathMutableCursor(IXmlNode parent, CompiledXPath path,
			IXmlIncludedTypeMap knownTypes, IXmlNamespaceSource namespaces, CursorFlags flags)
			: base(path, namespaces, parent)
		{
			if (null == parent)
				throw Error.ArgumentNull("parent");
			if (null == path)
				throw Error.ArgumentNull("path");
			if (null == knownTypes)
				throw Error.ArgumentNull("knownTypes");
			if (!path.IsCreatable)
				throw Error.XPathNotCreatable(path);

			this.step       = path.FirstStep;
			this.knownTypes = knownTypes;
			this.flags      = flags;

			var source = parent.RequireRealizable<XPathNavigator>();
			if (source.IsReal)
				iterator = new XPathBufferedNodeIterator(
					source.Value.Select(path.FirstStep.Path));
		}