/// <summary> /// Initializes a new instance of the <see cref="T:CecilWeaverConfiguration"/> class. /// </summary> /// <param name="assemblyConfig">The assembly config.</param> /// <param name="weaveConfiguration">The weave configuration.</param> public CecilWeaverConfiguration(AssemblyConfig assemblyConfig, ConfigurationContainer weaveConfiguration, WeaveDebug weaveDebug) { if (assemblyConfig == null) { throw new ArgumentNullException("assemblyConfig"); } if (weaveConfiguration == null) { throw new ArgumentNullException("weaveConfiguration"); } _weaveConfiguration = weaveConfiguration; _binfolder = System.IO.Path.GetDirectoryName(assemblyConfig.FileName); _assemblyConfig = assemblyConfig; _outputImagePath = assemblyConfig.FileName; _inputImagePath = assemblyConfig.FileName; _weaveDebugLevel = weaveDebug; }
/// <summary> /// Binds the properties. /// </summary> protected override void BindProperties() { if (this.ProjectMgr == null) { Debug.Assert(false); return; } string dlevel = this.GetConfigProperty(ConfigurationPropertyPageTag.DebugLevel.ToString()); if (!String.IsNullOrEmpty(dlevel)) { try { this.debugLevel = (DebugLevel)Enum.Parse(typeof(DebugLevel), dlevel); } catch { } //Should only fail if project file is corrupt } string wlevel = this.GetConfigProperty(ConfigurationPropertyPageTag.WeaveDebugLevel.ToString()); if (!string.IsNullOrEmpty(wlevel)) { try { this.weaveDebugLevel = (WeaveDebug)Enum.Parse(typeof(WeaveDebug), wlevel); } catch { } //Should only fail if project file is corrupt } bool verifyILTemp = false; if (Boolean.TryParse(this.GetConfigProperty(ConfigurationPropertyPageTag.VerifyIL.ToString()), out verifyILTemp)) { verifyIL = verifyILTemp; } bool filthOutputTemp = false; if (Boolean.TryParse(this.GetConfigProperty(ConfigurationPropertyPageTag.FILTHOutput.ToString()), out filthOutputTemp)) { filthOutput = filthOutputTemp; } bool secretEnabledTemp = false; if (Boolean.TryParse(this.GetConfigProperty(ConfigurationPropertyPageTag.SecretEnabled.ToString()), out secretEnabledTemp)) { secretEnabled = secretEnabledTemp; } string tmpBkMode = this.GetConfigProperty(ConfigurationPropertyPageTag.BookKeepingMode.ToString()); if (!string.IsNullOrEmpty(tmpBkMode)) { try { this.bkMode = (BookKeepingMode)Enum.Parse(typeof(BookKeepingMode), tmpBkMode); } catch { } //Should only fail if project file is corrupt } activeStarlightVersion = this.GetConfigProperty(ConfigurationPropertyPageTag.ActiveStarlightVersion.ToString()); }