System.Xml.Schema.BaseProcessor.IsValidTypeRedefine C# (CSharp) Method

IsValidTypeRedefine() private method

private IsValidTypeRedefine ( XmlSchemaObject existingObject, XmlSchemaObject item ) : bool
existingObject XmlSchemaObject
item XmlSchemaObject
return bool
        private bool IsValidTypeRedefine(XmlSchemaObject existingObject, XmlSchemaObject item) {
            XmlSchemaType schemaType = item as XmlSchemaType;
            if (existingObject == schemaType.Redefined) { //schemaType is the redefinition of existingObject
                XmlSchemaType existingType = existingObject as XmlSchemaType;
                if (existingType.ElementDecl == null) { //If the existing one is not already compiled, then replace.
                    return true;
                }
            }
            return false;
        }