/// <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;
        }