public void DownloadItem(string path, string destinationFolder, ReportItemTypes type, bool preserveFolders) { switch (type) { case ReportItemTypes.Folder: foreach (var catalogItem in RsFacade.ListChildren(path, true)) { DownloadItem(catalogItem.Path, destinationFolder, catalogItem.Type, preserveFolders); } break; case ReportItemTypes.Report: var definition = new XmlDocument(); definition.Load(new MemoryStream(RsFacade.GetReportDefinition(path))); SaveItem(path, type, destinationFolder, preserveFolders, definition); break; case ReportItemTypes.Model: var model = new XmlDocument(); model.Load(new MemoryStream(RsFacade.GetModelDefinition(path))); SaveItem(path, type, destinationFolder, preserveFolders, model); break; } toolStripStatusLabel.Text = String.Format("Downloaded '{0}'", path); Application.DoEvents(); }
private string GetModelDefinition(IRSFacade rsInstance, string path) { return(new UTF8Encoding().GetString(rsInstance.GetModelDefinition(path))); }