internal bool CompileSchema(XmlSchemaCollection xsc, XmlResolver resolver, SchemaInfo schemaInfo, string ns, ValidationEventHandler validationEventHandler, XmlNameTable nameTable, bool CompileContentModel)
 {
     lock (this)
     {
         SchemaCollectionPreprocessor preprocessor = new SchemaCollectionPreprocessor(nameTable, null, validationEventHandler) {
             XmlResolver = resolver
         };
         if (!preprocessor.Execute(this, ns, true, xsc))
         {
             return false;
         }
         this.isCompiled = new SchemaCollectionCompiler(nameTable, validationEventHandler).Execute(this, schemaInfo, CompileContentModel);
         this.SetIsCompiled(this.isCompiled);
         return this.isCompiled;
     }
 }
#pragma warning disable 618
        internal bool CompileSchema(XmlSchemaCollection xsc, XmlResolver resolver, SchemaInfo schemaInfo, string ns, ValidationEventHandler validationEventHandler, XmlNameTable nameTable, bool CompileContentModel) {

            //Need to lock here to prevent multi-threading problems when same schema is added to set and compiled
            lock (this) {
                //Preprocessing
                SchemaCollectionPreprocessor prep = new SchemaCollectionPreprocessor(nameTable, null, validationEventHandler);
                prep.XmlResolver = resolver;
                if (!prep.Execute(this, ns, true, xsc)) {
                    return false;
                }
            
                //Compilation
                SchemaCollectionCompiler compiler = new SchemaCollectionCompiler(nameTable, validationEventHandler);
                isCompiled = compiler.Execute(this, schemaInfo, CompileContentModel);
                this.SetIsCompiled(isCompiled);
                //TODO includes isCompiled flag
                return isCompiled;
            }
        }