コード例 #1
0
        private BackupObject GetBackupObject(Action <ExportImportProgressInfo> progressCallback)
        {
            progressCallback(new ExportImportProgressInfo("currencies loading"));
            var currencies = _commerceService.GetAllCurrencies().ToArray();

            progressCallback(new ExportImportProgressInfo(string.Format("currencies loaded: {0}", currencies.Count())));

            progressCallback(new ExportImportProgressInfo("package types loading"));
            var packageTypes = _commerceService.GetAllPackageTypes().ToArray();

            progressCallback(new ExportImportProgressInfo(string.Format("package types  loaded: {0}", packageTypes.Count())));

            return(new BackupObject()
            {
                Currencies = currencies,
                PackageTypes = packageTypes
            });
        }
コード例 #2
0
        public IHttpActionResult GetAllPackageTypes()
        {
            var retVal = _commerceService.GetAllPackageTypes().ToArray();

            return(Ok(retVal));
        }
コード例 #3
0
 public IEnumerable <PackageType> GetAllPackageTypes()
 {
     return(_commerceService.GetAllPackageTypes());
 }