Example #1
0
 public ICommandResult Export(Guid sessionGroupUniqueId)
 {
     try
     {
         string exportedFile = m_configExporter.Export(sessionGroupUniqueId);
         var    succeedRslt  = new ExportConfigRslt(true, ExportConfigCommand);
         succeedRslt.OutputFilePath = Path.GetFullPath(exportedFile);
         return(succeedRslt);
     }
     catch (Exception e)
     {
         var failedRslt = new ExportConfigRslt(ExportConfigCommand, e);
         return(failedRslt);
     }
 }
Example #2
0
        public override ICommandResult Run()
        {
            try
            {
                if (m_exportByGroupUniqueId && !m_sessionGroupUniqueId.Equals(Guid.Empty))
                {
                    ConfigExporter exporter = new ConfigExporter(this, m_exportConfigFileOnly, m_outputFilePath);
                    return(exporter.Export(m_sessionGroupUniqueId));
                }

                return(new ExportConfigRslt(false, this));
            }
            catch (Exception e)
            {
                var retVal = new ExportConfigRslt(this, e);
                return(retVal);
            }
        }