Exemplo n.º 1
0
Arquivo: XmlIR.cs Projeto: japj/vulcan
        public BimlFile AddXml(BimlFile bimlFile)
        {
            if (!BimlFiles.Any(item => item.FilePath == bimlFile.FilePath))
            {
                BimlFiles.Add(bimlFile);
            }

            return bimlFile;
        }
Exemplo n.º 2
0
Arquivo: XmlIR.cs Projeto: japj/vulcan
        public void ValidateXDocuments()
        {
            foreach (BimlFile bimlFile in BimlFiles)
            {
                _currentBimlFile = bimlFile;
                if (bimlFile.XDocument == null)
                {
                    try
                    {
                        XDocument.Load(new StringReader(bimlFile.Text), LoadOptions.SetLineInfo | LoadOptions.PreserveWhitespace);
                    }
                    catch (XmlException e)
                    {
                        MessageEngine.Trace(bimlFile.FilePath, e.LineNumber, e.LinePosition, Severity.Error, "V0150", e, e.Message);
                    }
                }
                else
                {
                    bimlFile.XDocument.Validate(SchemaSet, ValidationEventHandler, false);
                }
            }

            IsValidated = true;
            Id = Guid.NewGuid();
        }
Exemplo n.º 3
0
Arquivo: XmlIR.cs Projeto: japj/vulcan
 public BimlFile AddXml(string fileName, XmlIRDocumentType docType, bool isReadOnly)
 {
     var bimlFile = new BimlFile(docType, fileName, isReadOnly);
     return AddXml(bimlFile);
 }