Telerik.Web.Mvc.UI.WebAssetItemMerger.Merge C# (CSharp) Метод

Merge() публичный Метод

Merges the specified assets.
public Merge ( string contentType, string assetHandlerPath, bool isSecured, bool canCompress, WebAssetItemCollection assets ) : IList
contentType string Type of the content.
assetHandlerPath string The asset handler path.
isSecured bool if set to true [is secure].
canCompress bool if set to true [can compress].
assets WebAssetItemCollection The assets.
Результат IList
        public IList<string> Merge(string contentType, string assetHandlerPath, bool isSecured, bool canCompress, WebAssetItemCollection assets)
        {
            Guard.IsNotNullOrEmpty(contentType, "contentType");
            Guard.IsNotNullOrEmpty(assetHandlerPath, "assetHandlerPath");
            Guard.IsNotNull(assets, "assets");

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

            foreach (IWebAssetItem asset in assets)
            {
                WebAssetItem item = asset as WebAssetItem;
                WebAssetItemGroup itemGroup = asset as WebAssetItemGroup;

                if (item != null)
                {
                    mergedList.Add(Resolve(item.Source, null));
                }
                else if (itemGroup != null)
                {
                    IList<string> groupResult = MergeGroup(contentType, assetHandlerPath, isSecured, canCompress, itemGroup);

                    if (groupResult != null)
                        mergedList.AddRange(groupResult);
                }
            }

            return mergedList.ToList();
        }