System.CodeDom.Compiler.HandlerBase.IsIgnorableAlsoCheckForNonElement C# (CSharp) Method

IsIgnorableAlsoCheckForNonElement() static private method

static private IsIgnorableAlsoCheckForNonElement ( XmlNode node ) : bool
node System.Xml.XmlNode
return bool
        internal static bool IsIgnorableAlsoCheckForNonElement(XmlNode node) {
            if (node.NodeType == XmlNodeType.Comment || node.NodeType == XmlNodeType.Whitespace) {
                return true;
            }

            CheckForNonElement(node);

            return false;
        }

Usage Example

            internal static object CreateStatic(object inheritedObject, XmlNode node)
            {
                CodeDomCompilationConfiguration inherited = (CodeDomCompilationConfiguration)inheritedObject;
                CodeDomCompilationConfiguration result;

                if (inherited == null)
                {
                    result = new CodeDomCompilationConfiguration();
                }
                else
                {
                    result = new CodeDomCompilationConfiguration(inherited);
                }

                HandlerBase.CheckForUnrecognizedAttributes(node);

                //
                // Handle child elements (if they exist)
                //   - compilers
                //
                foreach (XmlNode child in node.ChildNodes)
                {
                    // skip whitespace and comments
                    // reject nonelements
                    if (HandlerBase.IsIgnorableAlsoCheckForNonElement(child))
                    {
                        continue;
                    }

                    // handle <compilers>
                    if (child.Name == "compilers")
                    {
                        ProcessCompilersElement(result, child);
                    }
                    else
                    {
                        HandlerBase.ThrowUnrecognizedElement(child);
                    }
                }

                return(result);
            }
All Usage Examples Of System.CodeDom.Compiler.HandlerBase::IsIgnorableAlsoCheckForNonElement