コード例 #1
0
ファイル: CodeModules.cs プロジェクト: kjb7749/testImport
        List <CodeModule> _Items;                        // list of code module

        internal CodeModules(ReportDefn r, ReportLink p, XmlNode xNode) : base(r, p)
        {
            _Items = new List <CodeModule>();
            // Loop thru all the child nodes
            foreach (XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                {
                    continue;
                }
                if (xNodeLoop.Name == "CodeModule")
                {
                    CodeModule cm = new CodeModule(r, this, xNodeLoop);
                    _Items.Add(cm);
                }
                else
                {
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown CodeModules element '" + xNodeLoop.Name + "' ignored.");
                }
            }
            if (_Items.Count == 0)
            {
                OwnerReport.rl.LogError(8, "For CodeModules at least one CodeModule is required.");
            }
            else
            {
                _Items.TrimExcess();
            }
        }
コード例 #2
0
        List<CodeModule> _Items; // list of code module

        #endregion Fields

        #region Constructors

        internal CodeModules(ReportDefn r, ReportLink p, XmlNode xNode)
            : base(r, p)
        {
            _Items = new List<CodeModule>();
            // Loop thru all the child nodes
            foreach(XmlNode xNodeLoop in xNode.ChildNodes)
            {
                if (xNodeLoop.NodeType != XmlNodeType.Element)
                    continue;
                if (xNodeLoop.Name == "CodeModule")
                {
                    CodeModule cm = new CodeModule(r, this, xNodeLoop);
                    _Items.Add(cm);
                }
                else
                {
                    // don't know this element - log it
                    OwnerReport.rl.LogError(4, "Unknown CodeModules element '" + xNodeLoop.Name + "' ignored.");
                }
            }
            if (_Items.Count == 0)
                OwnerReport.rl.LogError(8, "For CodeModules at least one CodeModule is required.");
            else
                _Items.TrimExcess();
        }