コード例 #1
0
ファイル: InstallationManager.cs プロジェクト: dpawatts/zeus
 public InstallationManager(IHost host, IContentTypeManager contentTypeManager, Importer importer, IPersister persister,
     IFinder finder, ICredentialService credentialService, AdminSection adminConfig)
 {
     _host = host;
     _contentTypeManager = contentTypeManager;
     _importer = importer;
     _persister = persister;
     _finder = finder;
     _credentialService = credentialService;
     _adminConfig = adminConfig;
 }
コード例 #2
0
ファイル: Default.aspx.cs プロジェクト: dpawatts/zeus
        private void Import(Importer importer, IImportRecord record)
        {
            try
            {
                if (chkSkipRoot.Checked)
                {
                    importer.Import(record, SelectedItem, ImportOptions.Children);
                    Refresh(SelectedItem, AdminFrame.Both, false);
                }
                else
                {
                    importer.Import(record, SelectedItem, ImportOptions.AllItems);
                    Refresh(record.RootItem, AdminFrame.Both, false);
                }

                ShowErrors(record);
            }
            catch (ZeusException ex)
            {
                cvImport.ErrorMessage = ex.Message;
                cvImport.IsValid = false;
                btnImportUploaded.Enabled = false;
            }
            finally
            {
                if (File.Exists(UploadedFilePath))
                    File.Delete(UploadedFilePath);
            }
        }