Telerik.Web.Mvc.UI.WebAssetItemMerger.MergeGroup C# (CSharp) Méthode

MergeGroup() public méthode

public MergeGroup ( string contentType, string assetHandlerPath, bool isSecured, bool canCompress, WebAssetItemGroup group ) : IList
contentType string
assetHandlerPath string
isSecured bool
canCompress bool
group WebAssetItemGroup
Résultat IList
        public IList<string> MergeGroup(string contentType, string assetHandlerPath, bool isSecured, bool canCompress, WebAssetItemGroup group)
        {
            Guard.IsNotNullOrEmpty(contentType, "contentType");
            Guard.IsNotNullOrEmpty(assetHandlerPath, "assetHandlerPath");
            Guard.IsNotNull(group, "group");

            IList<string> mergedList = new List<string>();

            WebAssetItemGroup itemGroup = group;

            if (itemGroup != null)
            {
                if (!itemGroup.Enabled)
                {
                    return null;
                }

                if (!string.IsNullOrEmpty(itemGroup.ContentDeliveryNetworkUrl))
                {
                    mergedList.Add(itemGroup.ContentDeliveryNetworkUrl);
                }
                else
                {
                    WebAssetItemGroup frameworkGroup = null;

                    if (itemGroup.UseTelerikContentDeliveryNetwork)
                    {
                        frameworkGroup = FilterFrameworkGroup(itemGroup);
                    }

                    if ((frameworkGroup != null) && !frameworkGroup.Items.IsEmpty())
                    {
                        ProcessGroup(frameworkGroup, contentType, assetHandlerPath, mergedList);
                    }

                    if (itemGroup.UseTelerikContentDeliveryNetwork)
                    {
                        var nativeFiles = FilterNativeFiles(itemGroup);
                        foreach (string nativefile in nativeFiles)
                        {
                            string fullUrl = GetNativeFileCdnUrl(nativefile, isSecured, canCompress);

                            if (!mergedList.Contains(fullUrl, StringComparer.OrdinalIgnoreCase))
                            {
                                mergedList.Add(fullUrl);
                            }
                        }
                    }

                    if (!itemGroup.Items.IsEmpty())
                    {
                        ProcessGroup(itemGroup, contentType, assetHandlerPath, mergedList);
                    }
                }
            }

            return mergedList.ToList();
        }