예제 #1
0
        /*private string ExecuteCommand(InquiryEntity ie)
         * {
         *  IList<FileEntity> res = new List<FileEntity>();
         *  string result = string.Empty;
         *
         *  if (ie.Tasks != null)
         *  {
         *      IFinder finder = new WMI(true, ie);
         *      //todo for many tasks
         *      res = finder.Search(ie.Tasks[0]);
         *  }
         *
         *  if (res.Count > 0) result = CSVFile.WriteCsvString(res);
         *
         *  return res; // result;
         * }*/

        private List <FileEntity> ExecuteCommand(InquiryEntity ie)
        {
            List <FileEntity> res = new List <FileEntity>();

            //string result = string.Empty;

            if (ie.Tasks != null)
            {
                IFinder finder = new WMI(true, ie);
                //todo for many tasks
                res = finder.Search(ie.Tasks[0]);
            }

            //if (res.Count > 0) result = CSVFile.WriteCsvString(res);

            return(res); // result;
        }