/// <summary>
        /// Retrieve layouts from the application.
        /// </summary>
        /// <param name="smartApp">A SmartAppInfo object.</param>
        /// <returns>A LayoutList.</returns>
        public static LayoutList GetLayouts(this SmartAppInfo smartApp)
        {
            var layouts = new LayoutList();

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

            var layoutComparer = new LayoutInfoComparer();

            if (smartApp.Version.IsValid() &&
                smartApp.Concerns.IsValid())
            {
                var listToRetrieve = smartApp.Concerns.GetLayouts();

                layouts = layouts
                          .Union(
                    listToRetrieve,
                    layoutComparer)
                          .ToLayoutList();
            }

            return(layouts);
        }
        /// <summary>
        /// Retrieve layouts from concerns.
        /// </summary>
        /// <param name="concerns">A ConcernList object.</param>
        /// <returns>A LayoutList.</returns>
        public static LayoutList GetLayouts(this ConcernList concerns)
        {
            var layouts = new LayoutList();

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

            var layoutComparer = new LayoutInfoComparer();

            foreach (var concern in concerns)
            {
                if (concern.IsValid() &&
                    concern.Layouts.IsValid())
                {
                    layouts = layouts
                              .Union(
                        concern.Layouts.ToLayoutList(concern),
                        layoutComparer)
                              .ToLayoutList();
                }
            }

            return(layouts);
        }