/// <summary>
        /// Gets the content type boolean.
        /// </summary>
        /// <param name="recordDocument">The record document.</param>
        /// <returns>
        ///   <c>true</c> if [has content type] [the specified record document]; otherwise, <c>false</c>.
        /// </returns>
        private bool GetContentTypeBoolean(RecordDocument recordDocument)
        {
            foreach (SPList enabledLibrary in this.EnabledLibraries)
            {
                if (enabledLibrary.ContentTypesEnabled &&
                    enabledLibrary.ContentTypes[recordDocument.ContentType.Name] != null)
                {
                    return(true);
                }
            }

            return(false);
        }
        /// <summary>
        /// Gets the content type boolean.
        /// </summary>
        /// <param name="recordDocument">The record document.</param>
        /// <returns>
        /// The System.Boolean.
        /// </returns>
        private bool GetContentTypeBoolean(RecordDocument recordDocument)
        {
            const string SubContentType = "Submission Content Type";

            foreach (SPListItem routingRule in this.RoutingRules)
            {
                SPField spField = routingRule.Fields[SubContentType];
                if (routingRule[spField.Id].Equals(recordDocument.ContentType.Name.Trim()))
                {
                    return(true);
                }
            }

            return(false);
        }
        /// <summary>
        /// Gets the content type indices.
        /// </summary>
        /// <param name="recordDocument">
        /// The record document.
        /// </param>
        /// <returns>
        /// The System.Collections.Generic.List`1[T -&gt; System.Int32].
        /// </returns>
        private List <int> GetContentTypeIndices(RecordDocument recordDocument)
        {
            List <int> intList = new List <int>();

            for (int i = 0; i < this.EnabledLibraries.Count; i++)
            {
                SPList enabledLibrary = this.EnabledLibraries[i];
                if (enabledLibrary.ContentTypesEnabled &&
                    enabledLibrary.ContentTypes[recordDocument.ContentType.Name] != null)
                {
                    intList.Add(i);
                }
            }

            return(intList);
        }
        /// <summary>
        /// Gets the content type indices.
        /// </summary>
        /// <param name="recordDocument">
        /// The record document.
        /// </param>
        /// <returns>
        /// The System.Collections.Generic.List`1[T -&gt; System.Int32].
        /// </returns>
        private List <int> GetContentTypeIndices(RecordDocument recordDocument)
        {
            List <int>   intList        = new List <int>();
            const string SubContentType = "Submission Content Type";

            for (int i = 0; i < this.RoutingRules.Count; i++)
            {
                SPListItem routingRule = this.RoutingRules[i];
                SPField    spField     = routingRule.Fields[SubContentType];
                if (routingRule[spField.Id].Equals(recordDocument.ContentType.Name.Trim()))
                {
                    intList.Add(i);
                }
            }

            return(intList);
        }
        /// <summary>
        /// Gets the content type boolean.
        /// </summary>
        /// <param name="recordDocument">
        /// The record document.
        /// </param>
        /// <param name="checkParent">
        /// The check parent.
        /// </param>
        /// <returns>
        /// The System.Boolean.
        /// </returns>
        public bool GetContentTypeBoolean(RecordDocument recordDocument, bool checkParent)
        {
            if (!checkParent)
            {
                return(this.GetContentTypeBoolean(recordDocument));
            }
            else
            {
                bool boo = false;

                foreach (SPList enabledLibrary in this.EnabledLibraries)
                {
                    if (enabledLibrary.ContentTypesEnabled &&
                        enabledLibrary.ContentTypes[recordDocument.ParentContentType.Name] != null)
                    {
                        boo = true;
                    }
                }

                return(this.GetContentTypeBoolean(recordDocument) || boo);
            }
        }
        /// <summary>
        /// Gets the content type boolean.
        /// </summary>
        /// <param name="recordDocument">
        /// The record document.
        /// </param>
        /// <param name="checkParent">
        /// if set to <c>true</c> [check parent].
        /// </param>
        /// <returns>
        /// The System.Boolean.
        /// </returns>
        public bool GetContentTypeBoolean(RecordDocument recordDocument, bool checkParent)
        {
            if (!checkParent)
            {
                return(this.GetContentTypeBoolean(recordDocument));
            }
            else
            {
                bool         boo            = false;
                const string SubContentType = "Submission Content Type";

                foreach (SPListItem routingRule in this.RoutingRules)
                {
                    SPField spField = routingRule.Fields[SubContentType];
                    if (routingRule[spField.Id].Equals(recordDocument.ParentContentType.Name.Trim()))
                    {
                        boo = true;
                    }
                }

                return(boo || this.GetContentTypeBoolean(recordDocument));
            }
        }
        /// <summary>
        /// Gets the content type indices.
        /// </summary>
        /// <param name="recordDocument">
        /// The record document.
        /// </param>
        /// <param name="checkParent">
        /// if set to <c>true</c> [check parent].
        /// </param>
        /// <returns>
        /// The System.Collections.Generic.List`1[T -&gt; System.Int32].
        /// </returns>
        public List <int> GetContentTypeIndices(RecordDocument recordDocument, bool checkParent)
        {
            if (!checkParent)
            {
                return(this.GetContentTypeIndices(recordDocument));
            }
            else
            {
                List <int> intList = new List <int>();

                for (int i = 0; i < this.EnabledLibraries.Count; i++)
                {
                    SPList enabledLibrary = this.EnabledLibraries[i];
                    if (enabledLibrary.ContentTypesEnabled &&
                        enabledLibrary.ContentTypes[recordDocument.ParentContentType.Name] != null)
                    {
                        intList.Add(i);
                    }
                }

                return(intList);
            }
        }