/// <summary> /// Extracts the Clr assemblies to file. /// </summary> private void ExtractClr() { if (this.ExtractAssemblies && !string.IsNullOrEmpty(this.ExtractAssembliesConfig)) { Utilities.Logger.LogInformation("Extracting assembly bits ..."); AssembliesToExtract asms = this.GetAssemblies(); foreach (AssemblyToExtract asm in asms.ConfiguredAssemblies) { Utilities.Logger.LogInformation(string.Format("Extracting assembly {0} from {1} ...", asm.Name, asm.FilePath)); Utilities.ExtractClrToFile(asm); } } }
/// <summary> /// Gets the assemblies from the config file. /// </summary> /// <returns>null if there are no assemblies</returns> private AssembliesToExtract GetAssemblies() { AssembliesToExtract asm = null; if (File.Exists(this.ExtractAssembliesConfig)) { using (StreamReader sr = new StreamReader(this.ExtractAssembliesConfig)) { XmlSerializer xs = new XmlSerializer(typeof(AssembliesToExtract)); asm = (AssembliesToExtract)xs.Deserialize(sr.BaseStream); sr.Close(); } } return(asm); }