Exemple #1
0
        public void AddMemberNode(XmlReader memberReader, string file)
        {
            XmlReader subtree = memberReader.ReadSubtree();

            while (subtree.Read())
            {
                if ((subtree.NodeType == XmlNodeType.Element) && (subtree.Name == "overload"))
                {
                    string paramTypes          = subtree.GetAttribute("types");
                    string overloadIncludeAttr = subtree.GetAttribute("include");
                    bool   overloadIncluded    = Convert.ToBoolean(String.IsNullOrEmpty(overloadIncludeAttr) ?
                                                                   "true" : overloadIncludeAttr, CultureInfo.InvariantCulture);

                    // check for existing overload filters that identify the same overload
                    bool alreadyFiltered = false;
                    foreach (OverloadFilter overloadFilter in overloadFilters)
                    {
                        if (!string.IsNullOrEmpty(paramTypes) && paramTypes == overloadFilter.ParamTypes)
                        {
                            alreadyFiltered = true;
                        }
                        if (alreadyFiltered && (overloadIncluded != overloadFilter.Included))
                        {
                            // write warning message about conflicting filters
                            // ISSUE: how to invoke WriteMessage from here
                            Console.Write("");
                        }
                    }
                    if (!alreadyFiltered)
                    {
                        OverloadFilter overloadFilter = new OverloadFilter(subtree, file);
                        overloadFilters.Add(overloadFilter);
                    }
                }
            }
            subtree.Close();
        }
        public void AddMemberNode(XmlReader memberReader, string file)
        {
            XmlReader subtree = memberReader.ReadSubtree();
            while (subtree.Read())
            {
                if ((subtree.NodeType == XmlNodeType.Element) && (subtree.Name == "overload"))
                {
                    string paramTypes = subtree.GetAttribute("types");
                    string overloadIncludeAttr = subtree.GetAttribute("include");
                    bool overloadIncluded = Convert.ToBoolean(String.IsNullOrEmpty(overloadIncludeAttr) ?
                        "true" : overloadIncludeAttr, CultureInfo.InvariantCulture);

                    // check for existing overload filters that identify the same overload
                    bool alreadyFiltered = false;
                    foreach (OverloadFilter overloadFilter in overloadFilters)
                    {
                        if (!string.IsNullOrEmpty(paramTypes) && paramTypes == overloadFilter.ParamTypes)
                            alreadyFiltered = true;
                        if (alreadyFiltered && (overloadIncluded != overloadFilter.Included))
                        {
                            // write warning message about conflicting filters
                            // ISSUE: how to invoke WriteMessage from here
                            Console.Write("");
                        }
                    }
                    if (!alreadyFiltered)
                    {
                        OverloadFilter overloadFilter = new OverloadFilter(subtree, file);
                        overloadFilters.Add(overloadFilter);
                    }
                }
            }
            subtree.Close();
        }