当前位置: 首页>>代码示例>>C#>>正文


C# System.IsStartElement方法代码示例

本文整理汇总了C#中System.IsStartElement方法的典型用法代码示例。如果您正苦于以下问题:C# System.IsStartElement方法的具体用法?C# System.IsStartElement怎么用?C# System.IsStartElement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System的用法示例。


在下文中一共展示了System.IsStartElement方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CanRead

        public override bool CanRead(System.Xml.XmlReader reader)
        {
            if (reader == null)
                throw new ArgumentNullException("reader");

            return reader.IsStartElement("RDF", this.RdfNamespaceUri);
        }
开发者ID:iwaim,项目名称:growl-for-windows,代码行数:7,代码来源:Rss10FeedFormatter.cs

示例2: ReadCommand

        /// <summary>
        /// Lê comando.
        /// </summary>
        /// <param name="p_reader">Objeto XML.</param>
        private void ReadCommand(System.Xml.XmlReader p_reader)
        {
            System.Xml.XmlReader v_item;

            this.v_cmd = new Spartacus.Database.Command();

            while (p_reader.Read())
            {
                if (p_reader.IsStartElement())
                {
                    switch (p_reader.Name)
                    {
                        case "sql":
                            this.v_cmd.v_text = p_reader.ReadString();
                            break;
                        case "parameter":
                            v_item = p_reader.ReadSubtree();
                            this.ReadParameter(v_item);
                            v_item.Close();
                            break;
                        default:
                            break;
                    }
                }
            }
        }
开发者ID:lubota,项目名称:spartacus,代码行数:30,代码来源:Spartacus.Reporting.ReportXML.cs

示例3: FromXml

        public bool FromXml(ref System.Xml.XmlReader xr)
        {
            bool results = false;

            try
            {
                while (xr.Read())
                {
                    if (xr.IsStartElement())
                    {
                        if (!xr.IsEmptyElement)
                        {
                            switch (xr.Name)
                            {
                                case "Bvin":
                                    xr.Read();
                                    Bvin = xr.ReadString();
                                    break;
                                case "ControlName":
                                    xr.Read();
                                    ControlName = xr.ReadString();
                                    break;
                                case "SortOrder":
                                    xr.Read();
                                    SortOrder = int.Parse(xr.ReadString());
                                    break;
                                case "ColumnId":
                                    xr.Read();
                                    ColumnId = xr.ReadString();
                                    break;
                                case "SerializedSettings":
                                    xr.Read();
                                    string json = xr.ReadString();
                                    this.BaseSettings = MerchantTribe.Web.Json.ObjectFromJson<ContentBlockSettings>(json);
                                    break;
                                case "Lists":
                                    xr.Read();
                                    string jsonlist = xr.ReadString();
                                    this.Lists = MerchantTribe.Web.Json.ObjectFromJson<ContentBlockSettingList>(jsonlist);
                                    break;
                            }
                        }
                    }
                }

                results = true;
            }

            catch (XmlException XmlEx)
            {
                EventLog.LogEvent(XmlEx);
                results = false;
            }

            return results;

        }
开发者ID:appliedi,项目名称:MerchantTribe,代码行数:57,代码来源:ContentBlock.cs

示例4: ReadXml

        public override void ReadXml(System.Xml.XmlReader reader)
        {
            reader.ReadStartElement();

            while (reader.IsStartElement())
            {
                reader.Read();
            }

            reader.Read();
        }
开发者ID:faboo,项目名称:faux,代码行数:11,代码来源:OtherFilesFolder.cs

示例5: ReadXml

        public void ReadXml(System.Xml.XmlReader reader)
        {
            while (!reader.IsStartElement("BlockCache") && !reader.EOF)
                reader.Read();

            if (reader.EOF)
                return;

            if (reader.IsEmptyElement && reader.Name == "BlockCache")
            {
                reader.ReadStartElement("BlockCache");
                BlockCache = new SerializableDictionary<IPAddr, BlockedIP>();
            }
            else
            {
                reader.ReadStartElement("BlockCache");
                BlockCache = (SerializableDictionary<IPAddr, BlockedIP>)new XmlSerializer(typeof(SerializableDictionary<IPAddr, BlockedIP>)).Deserialize(reader);
                reader.ReadEndElement();
            }

            while (!reader.IsStartElement("dos_threshold") && !reader.EOF)
                reader.Read();

            if (reader.EOF)
                return;

            reader.ReadStartElement("dos_threshold");
            dos_threshold = (int)new XmlSerializer(typeof(int)).Deserialize(reader);
            reader.ReadEndElement();

            while (!reader.IsStartElement("Save") && !reader.EOF)
                reader.Read();

            if (reader.EOF)
                return;

            reader.ReadStartElement("Save");
            Save = (bool)new XmlSerializer(typeof(bool)).Deserialize(reader);
            reader.ReadEndElement();
        }
开发者ID:zzz654321,项目名称:fireBwall,代码行数:40,代码来源:fireBwallModule.cs

示例6: HandleEponymousNode

 private void HandleEponymousNode(System.Xml.XmlReader reader)
 {
     if (reader.IsStartElement() && !reader.IsEmptyElement)
     {
         HandleStartNode(reader);
     }
     else
     {
         AddCompletedObject(m_dataObject);
         IsFinished = true;
         m_dataObject = null;
     }
 }
开发者ID:killbug2004,项目名称:WSProf,代码行数:13,代码来源:themeFontDefinition_Handler.cs

示例7: UnpersistBag

        public override void UnpersistBag(IParamBag target, System.Xml.XmlReader reader)
        {
            // Assumes reader has started the read of elements which contain actual param values
            IExtractKthCoreParamBag bag = (IExtractKthCoreParamBag)target;

            if (reader.Name == "K")
            {
                bag.K = UnpersistK(reader);
            }

            if (reader.IsStartElement() && !reader.IsEmptyElement)
            {
                reader.Read();
            }
        }
开发者ID:BgRva,项目名称:Blob1,代码行数:15,代码来源:ParamBagDepersister.cs

示例8: HandleNode

        public override void HandleNode(System.Xml.XmlReader reader)
        {
            if (reader.LocalName == "majorFont" ||
                reader.LocalName == "minorFont")
            {
                HandleEponymousNode(reader);
                return;
            }
            if (string.IsNullOrEmpty(reader.LocalName) || !reader.IsStartElement())
            {
                return;
            }

            HandleNamedNode(reader);
        }
开发者ID:killbug2004,项目名称:WSProf,代码行数:15,代码来源:themeFontDefinition_Handler.cs

示例9: HandleNode

        public override void HandleNode(System.Xml.XmlReader reader)
        {
            if (reader.IsEmptyElement)
            {
                return;
            }

            if (!Context.IsWordMLPrefix(reader.Prefix))
                return;

            if (reader.IsStartElement())
            {
                HandleStartNode(reader);
                return;
            }
            return;
        }
开发者ID:killbug2004,项目名称:WSProf,代码行数:17,代码来源:FootnoteEndnoteSeparatorConsumer.cs

示例10: ReadXml

        public virtual void ReadXml(System.Xml.XmlReader reader)
        {
            reader.ReadStartElement();

            while (reader.IsStartElement())
            {
                if (reader.Name == "Name")
                {
                    Name = reader.ReadElementContentAsString();
                }
                else
                {
                    reader.Read();
                }
            }

            reader.ReadEndElement();
        }
开发者ID:faboo,项目名称:faux,代码行数:18,代码来源:Node.cs

示例11: UnpersistBag

        public override void UnpersistBag(IParamBag target, System.Xml.XmlReader reader)
        {
            // Assumes reader has started the read of elements which contain actual param values
            IExportNetworkParamBag bag = (IExportNetworkParamBag)target;

            bool loopAgain = false;
            int ctr = 0;
            do
            {
                if (reader.Name == bag.FileName_ParamName)
                {
                    bag.FileName = UnpersistFileName(reader);
                    ctr++;
                    loopAgain = true;
                }
                else if (reader.Name == bag.ExportNodeAttributes_ParamName)
                {
                    bag.ExportNodeAttributes = UnpersistExportNodeAttributes(reader);
                    ctr++;
                    loopAgain = true;
                }
                else if (reader.Name == bag.ExportEdgeAttributes_ParamName)
                {
                    bag.ExportEdgeAttributes = UnpersistExportEdgeAttributes(reader);
                    ctr++;
                    loopAgain = true;
                }
                else if (reader.Name == bag.FileType_ParamName)
                {
                    bag.FileType = UnpersistFileType(reader);
                    ctr++;
                    loopAgain = true;
                }
                else
                    loopAgain = false;
            } while (loopAgain && (ctr < (bag.Count + 1)));  // get out after each

            if (reader.IsStartElement() && !reader.IsEmptyElement)
            {
                reader.Read();
            }
        }
开发者ID:BgRva,项目名称:Blob1,代码行数:42,代码来源:ParamBagUnpersister.cs

示例12: UnpersistMgr

        public void UnpersistMgr(IParamMgr target, System.Xml.XmlReader reader)
        {
            // Assumes reader has started the read of element "ParamMgr"
            if (reader.Name == "ParamMgr" && !reader.IsEmptyElement)
            {
                reader.ReadStartElement("ParamMgr");

                IExportNetworkParamMgr mgr = (IExportNetworkParamMgr)target;

                using (ExportNetworkParamBagUnpersister unpersiter = new ExportNetworkParamBagUnpersister())
                {
                    unpersiter.UnpersistBag(mgr.Bag, reader);
                }

                if (reader.IsStartElement() && !reader.IsEmptyElement)
                {
                    reader.Read();
                }
            }
        }
开发者ID:BgRva,项目名称:Blob1,代码行数:20,代码来源:ParamMgrUnpersister.cs

示例13: ReadXml

        public override void ReadXml(System.Xml.XmlReader reader)
        {
            reader.ReadStartElement();

            while (reader.IsStartElement())
            {
                if (reader.Name == "Name")
                {
                    Name = reader.ReadElementContentAsString();
                }
                else if (reader.Name == "RealPath")
                {
                    RealPath = reader.ReadElementContentAsString();
                }
                else
                {
                    reader.Read();
                }
            }

            reader.ReadEndElement();
        }
开发者ID:faboo,项目名称:faux,代码行数:22,代码来源:File.cs

示例14: Read

        public void Read(out string id, out Domain domain, out string attribName, out Type attribType, out object defaultVal, System.Xml.XmlReader reader)
        {
            id = null;
            domain = Domain.all;
            attribName = null;
            attribType = null;
            defaultVal = null;

            reader.MoveToAttribute("id");
            id = reader["id"];

            reader.MoveToAttribute("for");
            domain = (Domain)Enum.Parse(typeof(Domain), reader["for"]);

            reader.MoveToAttribute("attr.name");
            attribName = reader["attr.name"];

            reader.MoveToAttribute("attr.type");
            attribType = GraphMLConvert.ToType(reader["attr.type"]);

            reader.MoveToElement();

            // if there is a default value element, read it and convet
            if (reader.ReadToDescendant("default"))
            {
                string defaultValStr = null;
                ReadDefault(out defaultValStr, reader);
                defaultVal = ConvertDefaultValStr(defaultValStr, attribType);
                if (!reader.IsStartElement() && reader.Name=="default")
                        reader.Read();  // read the end tag element of default
            }
            else
            {
                // default value is system default
                defaultVal = GetDefault( attribType);
            }
        }
开发者ID:BgRva,项目名称:Blob1,代码行数:37,代码来源:KeyReader.cs

示例15: SerializationException

        /// <summary>
        /// Deserialize from XML
        /// </summary>
        /// <param name="reader">   XML reader</param>
        void IXmlSerializable.ReadXml(System.Xml.XmlReader reader)
        {
            ChessBoard.MovePosS movePos;
            bool                bIsEmpty;

            m_listMovePos.Clear();
            if (reader.MoveToContent() != XmlNodeType.Element || reader.LocalName != "MoveList") {
                throw new SerializationException("Unknown format");
            } else {
                bIsEmpty     = reader.IsEmptyElement;
                m_iPosInList = Int32.Parse(reader.GetAttribute("PositionInList"));
                if (bIsEmpty) {
                    reader.Read();
                } else {
                    if (reader.ReadToDescendant("Move")) {
                        while (reader.IsStartElement()) {
                            movePos = new ChessBoard.MovePosS();
                            movePos.OriginalPiece   = (ChessBoard.PieceE)Enum.Parse(typeof(ChessBoard.SerPieceE), reader.GetAttribute("OriginalPiece"));
                            movePos.StartPos        = (byte)Int32.Parse(reader.GetAttribute("StartingPosition"));
                            movePos.EndPos          = (byte)Int32.Parse(reader.GetAttribute("EndingPosition"));
                            movePos.Type            = (ChessBoard.MoveTypeE)Enum.Parse(typeof(ChessBoard.MoveTypeE), reader.GetAttribute("MoveType"));
                            m_listMovePos.Add(movePos);
                            reader.ReadStartElement("Move");
                        }
                    }
                    reader.ReadEndElement();
                }
            }
        }
开发者ID:enesyteam,项目名称:EChess,代码行数:33,代码来源:MovPosStack.cs


注:本文中的System.IsStartElement方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。