/// <summary> /// This method will be called first when the release is started. The application will pass the latest information /// from the running instance to the script through given parameters. The script should do its final check /// for proper release conditions, throwing exceptions if problems occur. /// </summary> public object StartRelease(IList <IExporter> exporters, IIndexField[] indexFields, IDictionary <string, string> releaseData) { if (string.IsNullOrEmpty(m_Destination)) { throw new Exception("Please specify a release destination"); } if (string.IsNullOrEmpty(m_IndexFileName)) { throw new Exception("Please specify an index file name"); } m_DocConverter = null; m_PageConverter = null; index = new AxIndexGenerator(); foreach (IExporter exporter in exporters) { if (exporter.Id == m_FileTypeId) { if (m_WorkingMode == ReleaseMode.SinglePage) { m_PageConverter = exporter as IPageOutputConverter; } else { m_DocConverter = exporter as IDocumentOutputConverter; } } } /// When both of them can't be found, either the user hasn't set up properly, or the chosen converter has disappeared. /// The script can declare that the release cannot continue or proceed with default settings. if (m_PageConverter == null && m_DocConverter == null) { throw new Exception("Please select an output file type"); } /// The application will keep any object returned from this function and pass it back to the script /// in the EndRelease call. This is usually intended to facilitate cleanup. return(null); }
/// <summary> /// This method will be called first when the release is started. The application will pass the latest information /// from the running instance to the script through given parameters. The script should do its final check /// for proper release conditions, throwing exceptions if problems occur. /// </summary> public object StartRelease(IList<IExporter> exporters, IIndexField[] indexFields, IDictionary<string, string> releaseData) { if (string.IsNullOrEmpty(m_Destination)) throw new Exception("Please specify a release destination"); if (string.IsNullOrEmpty(m_IndexFileName)) throw new Exception("Please specify an index file name"); m_DocConverter = null; m_PageConverter = null; index = new AxIndexGenerator(); foreach (IExporter exporter in exporters) { if (exporter.Id == m_FileTypeId) { if (m_WorkingMode == ReleaseMode.SinglePage) m_PageConverter = exporter as IPageOutputConverter; else m_DocConverter = exporter as IDocumentOutputConverter; } } /// When both of them can't be found, either the user hasn't set up properly, or the chosen converter has disappeared. /// The script can declare that the release cannot continue or proceed with default settings. if (m_PageConverter == null && m_DocConverter == null) throw new Exception("Please select an output file type"); /// The application will keep any object returned from this function and pass it back to the script /// in the EndRelease call. This is usually intended to facilitate cleanup. return null; }
public object StartRelease(IList<IExporter> exporters, IIndexField[] indexFields, IDictionary<string, string> releaseData, IApplication licenseData) { if (string.IsNullOrEmpty(_exportFileName)) throw new Exception("Please specify a file name"); foreach (IExporter exporter in exporters) if (exporter.DefaultExtension == Path.GetExtension(_exportFileName).ToUpper().TrimStart('.')) if (_workingMode == ReleaseMode.SinglePage) _pageConverter = exporter as IPageOutputConverter; else _docConverter = exporter as IDocumentOutputConverter; if (_pageConverter == null && _docConverter == null) throw new Exception("Please select an output file type"); return null; }
public object StartRelease(IList<IExporter> exporters, IIndexField[] indexFields, IDictionary<string, string> releaseData, IApplication licenseData) { _email = new Email(_settings); foreach (IExporter exporter in exporters) { if (exporter.Id == _settings.FileTypeId) { if (_settings.ReleaseMode == ReleaseMode.SinglePage) _pageConverter = exporter as IPageOutputConverter; else _documentConverter = exporter as IDocumentOutputConverter; } } return null; }
public object StartRelease(IList<IExporter> exporters, IIndexField[] indexFields, IDictionary<string, string> releaseData) { if (string.IsNullOrEmpty(_releaseSettings.Destination)) throw new Exception("Please specify a release destination"); _docConverter = null; _pageConverter = null; foreach (IExporter exporter in exporters) { if (exporter.Id == _releaseSettings.FileTypeId) { if (_releaseSettings.ReleaseMode == ReleaseMode.SinglePage) _pageConverter = exporter as IPageOutputConverter; else _docConverter = exporter as IDocumentOutputConverter; } } if (_pageConverter == null && _docConverter == null) throw new Exception("Please specify an output file type."); return null; }