Пример #1
0
        static public ProductBuildDataSet GetProfileDataSet(string profileName)
        {
            ProductBuildDataSet profileDataSet = new ProductBuildDataSet();
            XmlTextReader       xtr            = null;

            try {
                XmlParserContext xpc = new XmlParserContext(null, new XmlNamespaceManager(new NameTable()), null, XmlSpace.None);
                xtr = new XmlTextReader(GetBuildProfile(profileName), XmlNodeType.Document, xpc);
                profileDataSet.ReadXml(xtr);
                profileDataSet.AcceptChanges();
                profileDataSet.SetBuildProperty("BuildProfileName", profileName, false);
            }
            finally {
                if (xtr != null)
                {
                    xtr.Close();
                }
            }
            return(profileDataSet);
        }
Пример #2
0
        static private ProductBuildDataSet GetProductSpecificDataSet(LibraryInfo libraryInfo)
        {
            ProductBuildDataSet productSpecificDataSet = new ProductBuildDataSet();
            XmlTextReader       xtr = null;

            try {
                string productPropertiesFilename = GetProductPropertiesFilename(libraryInfo);
                if (File.Exists(productPropertiesFilename))
                {
                    xtr = new XmlTextReader(GetProductPropertiesFilename(libraryInfo));
                    productSpecificDataSet.ReadXml(xtr);
                }
                string emailRecipients = "";
                productSpecificDataSet.SetBuildProperty("EmailRecipients", emailRecipients, true);
            }
            finally {
                if (xtr != null)
                {
                    xtr.Close();
                }
            }
            return(productSpecificDataSet);
        }
Пример #3
0
        static public ProductBuildDataSet ReadBuildConfigurationFile(string filename)
        {
            ProductBuildDataSet pbDataSet = new ProductBuildDataSet();
            XmlTextReader       xtr       = null;

            try {
                if (File.Exists(filename))
                {
                    xtr = new XmlTextReader(filename);
                    pbDataSet.ReadXml(xtr);
                }
                else
                {
                    throw new Exception("The build configuration file, " + filename + ", does not exist.");
                }
            }
            finally {
                if (xtr != null)
                {
                    xtr.Close();
                }
            }
            return(pbDataSet);
        }