/// <summary>
        /// Creates and returns an action descriptor mapping for the specified controller descriptor.
        /// </summary>
        /// <param name="controllerDescriptor">The <see cref="HttpControllerDescriptor">controller descriptor</see> to create a mapping for.</param>
        /// <returns>A <see cref="ILookup{TKey,TValue}">lookup</see>, which represents the route-to-action mapping for the
        /// specified <paramref name="controllerDescriptor">controller descriptor</paramref>.</returns>
        public virtual ILookup <string, HttpActionDescriptor> GetActionMapping(HttpControllerDescriptor controllerDescriptor)
        {
            Arg.NotNull(controllerDescriptor, nameof(controllerDescriptor));
            Contract.Ensures(Contract.Result <ILookup <string, HttpActionDescriptor> >() != null);

            var internalSelector = GetInternalSelector(controllerDescriptor);
            var actionMappings   = new List <ILookup <string, HttpActionDescriptor> >();

            actionMappings.Add(internalSelector.GetActionMapping());

            foreach (var relatedControllerDescriptor in controllerDescriptor.GetRelatedCandidates())
            {
                if (relatedControllerDescriptor != controllerDescriptor)
                {
                    actionMappings.Add(GetInternalSelector(relatedControllerDescriptor).GetActionMapping());
                }
            }

            return(actionMappings.Count == 1 ? actionMappings[0] : new AggregatedActionMapping(actionMappings));
        }