/// <summary>
        /// Retrieve all direct references from a list of layouts.
        /// </summary>
        /// <param name="layouts">A LayoutList object.</param>
        /// <returns>A list of EntityInfo.</returns>
        public static List <EntityInfo> GetLayoutListDirectReferences(this LayoutList layouts)
        {
            var directReferences = new List <EntityInfo>();

            if (!layouts.IsValid())
            {
                return(directReferences);
            }

            var entityComparer = new EntityInfoComparer();

            foreach (var layout in layouts)
            {
                if (layout.IsValid())
                {
                    directReferences = directReferences
                                       .Union(
                        layout.GetLayoutDirectReferences(),
                        entityComparer)
                                       .ToList();
                }
            }

            return(directReferences);
        }
        public static bool IsValid(this LayoutList layouts)
        {
            if (!layouts.IsValid <LayoutInfo>())
            {
                return(false);
            }

            return(true);
        }