public void Init(XmlConfigElement xe) { foreach (XElement xe2 in xe.GetElements("Frameworks/Framework")) { _frameworkDirectories.Add(xe2.zExplicitAttribValue("version"), xe2.zExplicitAttribValue("directory")); } _win32ResourceCompiler = new Win32ResourceCompiler(xe.Get("Win32ResourceCompiler")); _resourceCompiler = new ResourceCompiler(xe.Get("ResourceCompiler")); //string disableMessages = xe.Get("DisableCompilerMessages"); //if (disableMessages != null) //{ // Dictionary<string, string> disableMessagesDictionary = new Dictionary<string, string>(); // foreach (string messageId in zsplit.Split(disableMessages, ',', true)) // disableMessagesDictionary.Add(messageId, messageId); // _messageFilter = compilerMessage => !disableMessagesDictionary.ContainsKey(compilerMessage.Id); //} _messageFilter = GetMessageFilter(xe.Get("DisableCompilerMessages")); _updateAssembly = xe.Get("UpdateAssembly").zTryParseAs(false); ; _updateSubDirectory = xe.Get("UpdateAssemblySubDirectory", _updateSubDirectory); ; _traceUpdateAssembly = xe.Get("TraceUpdateAssembly").zTryParseAs(false); //Trace.WriteLine("CompilerManager.Init() :"); //Trace.WriteLine(" UpdateAssembly : {0}", _updateAssembly); //Trace.WriteLine(" UpdateSubDirectory : {0}", _updateSubDirectory); //Trace.WriteLine(" TraceUpdateAssembly : {0}", _traceUpdateAssembly); }
public XmlConfigElement GetConfigElementExplicit(string xpath) { XmlConfigElement configElement = GetConfigElement(xpath); if (configElement == null) throw new PBException("element \"{0}\" dont exist in \"{1}\" and in \"{2}\"", xpath, _configFile, _configLocalFile); return configElement; }
private CompilerProjectReader(XmlConfigElement projectXmlElement, bool isIncludeProject = false) { if (projectXmlElement == null) throw new PBException("projectXmlElement is null when creating pb.Compiler.CompilerProject"); _projectXmlElement = projectXmlElement; _projectFile = projectXmlElement.XmlConfig.ConfigFile; if (_projectFile != null) _projectDirectory = zPath.GetDirectoryName(_projectFile); _isIncludeProject = isIncludeProject; }
public static CompilerProjectReader Create(XmlConfigElement projectXmlElement, bool isIncludeProject = false) { if (projectXmlElement != null) return new CompilerProjectReader(projectXmlElement, isIncludeProject); else return null; }