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();
}