private void method_2(DataGridView dataGridView_0, string string_0, string string_1) { ExportToXml xml = new ExportToXml(dataGridView_0); xml.ExportStartingEvent += new EventHandler(this.method_4); xml.ExportProgressingEvent += new EventHandler(this.method_3); xml.ExportEndedEvent += new EventHandler <ExportEndedEventArgs>(this.method_5); xml.ConvertToExcel(string_0, string_1); }
/// <summary> /// XML DataExporter /// </summary> /// <param name="description">the produced file's description</param> /// <param name="fileName">the produced file's name</param> public void ToXml(string description = "Exported Data", string fileName = "data.xml") { var exportToXml = new ExportToXml { Description = description, FileName = fileName }; _pdfReport.DataBuilder.CustomExportSettings.Add(exportToXml); }
internal static string ExportToXml(IEnumerable <IFragment> fragments) { StringBuilder xmlStringBuider = new StringBuilder(); ExportToXml exportToXml = new ExportToXml((f) => new StringWriter(xmlStringBuider), DataBlockScanner, new DefaultDetectorFormatter()); using (IDataReaderPool dataReaderPool = _container.Resolve <IDataReaderPool>()) { exportToXml.Export(fragments, dataReaderPool, "<path>", MockRepository.GenerateStub <IProgressReporter>()); return(xmlStringBuider.ToString()); } }
static void Main(string[] args) { //not enogh time to complete XML import, JSON export and refactoring ImportFromJson.ImportSolarSystems(); ImportFromJson.ImportStars(); ImportFromJson.ImportPlanets(); ImportFromJson.ImportPeople(); ImportFromJson.ImportAnomalities(); ImportFromJson.ImportAnomalityVictims(); ExportToXml.ExportAnomlaies(); }
public static XDocument ExportRules(bool exportAll = false) { SystemEventLogLogic.Log("Export AuthRules"); return(new XDocument( new XDeclaration("1.0", "utf-8", "yes"), new XElement("Auth", new XElement("Roles", RolesInOrder().Select(r => new XElement("Role", new XAttribute("Name", r.ToString()), GetMergeStrategy(r) == MergeStrategy.Intersection? new XAttribute("MergeStrategy", MergeStrategy.Intersection) : null, new XAttribute("Contains", roles.Value.RelatedTo(r).ToString(","))))), ExportToXml.GetInvocationListTyped().Select(a => a(exportAll)).NotNull().OrderBy(a => a.Name.ToString())))); }
static void Main(string[] args) { ExportToXml first = new ExportToXml("first.xml", "first.txt"); first.Export(); ExportToXml second = new ExportToXml("second.xml", "second.txt"); second.Export(); ExportToXml third = new ExportToXml("third.xml", "third.txt"); third.Export(); }
public static XDocument ExportRules(bool exportAll = false) { var imported = Database.Query <LastAuthRulesImportEntity>().SingleOrDefault(); SystemEventLogLogic.Log("Export AuthRules"); return(new XDocument( new XDeclaration("1.0", "utf-8", "yes"), new XElement("Auth", imported == null ? null : new XElement("Imported", new XAttribute("On", imported.Date.ToString("s"))), new XElement("Exported", new XAttribute("On", TimeZoneManager.Now.ToString("s"))), new XElement("Roles", RolesInOrder().Select(r => new XElement("Role", new XAttribute("Name", r.ToString()), GetMergeStrategy(r) == MergeStrategy.Intersection? new XAttribute("MergeStrategy", MergeStrategy.Intersection) : null, new XAttribute("Contains", roles.Value.RelatedTo(r).ToString(","))))), ExportToXml.GetInvocationListTyped().Select(a => a(exportAll)).NotNull().OrderBy(a => a.Name.ToString())))); }