/// <summary>
        /// Gets the value of the code start flag for the target document.
        /// </summary>
        /// <param name="doc">The document to test for a code start.</param>
        /// <param name="previousDoc">The previous document in the collection being exported.</param>
        /// <param name="settings">The XREF export settings.</param>
        /// <returns>Returns true if a flag is needed based on the code start trigger settings.</returns>
        protected bool getCodeStartFlag(Document doc, Document previousDoc, Switch trigger)
        {
            bool result = false;

            if (trigger != null)
            {
                result = trigger.IsTriggered(doc, previousDoc);
            }

            return(result);
        }
        /// <summary>
        /// Gets the value of the group start flag for the target document and image.
        /// </summary>
        /// <param name="imageKey">The image key of the current record.</param>
        /// <param name="docIndex">The index of the current document in the collection being exported.</param>
        /// <param name="settings">The XREF export settings.</param>
        /// <returns>Returns true if the image key matches the doc key and a flag is needed based on the
        /// group start trigger.</returns>
        protected bool getGroupStartFlag(string imageKey, int docIndex, Switch trigger)
        {
            bool     result      = false;
            Document doc         = this.docs[docIndex];
            Document previousDoc = getPreviousDoc(docIndex);

            if (imageKey.Equals(doc.Key) && trigger != null)
            {
                result = trigger.IsTriggered(doc, previousDoc);
            }

            return(result);
        }