/// <summary>
        /// Gets all descendant ids of the <paramref name="entity"/> regardless of publish status.
        /// </summary>
        /// <param name="entity">The content.</param>
        /// <returns></returns>
        public static IEnumerable <HiveId> AllChildIds(this TypedEntity entity)
        {
            var appContext = DependencyResolver.Current.GetService <IRebelApplicationContext>();

            if (appContext != null && appContext.Hive != null)
            {
                return(entity.AllChildIds(appContext.Hive));
            }
            return(Enumerable.Empty <HiveId>());
        }