Inheritance: IWebAsset
Ejemplo n.º 1
0
 public WebAssetTests()
 {
     checker = new Mock<IWebAssetChecker>();
     serializer = new Mock<IWebAssetGroupSerializer>();
     resolverFactory = new Mock<IWebAssetResolverFactory>();
     asset = new WebAsset("~/Script/content1.js");
 }
Ejemplo n.º 2
0
        private bool AlreadyExists(IWebAsset item)
        {
            WebAsset      assetItem      = item as WebAsset;
            WebAssetGroup assetItemGroup = item as WebAssetGroup;

            if (assetItem != null)
            {
                return(AssetItems.Any(i => i != item && i.Source.IsCaseInsensitiveEqual(assetItem.Source)));
            }

            if (assetItemGroup != null)
            {
                return(AssetGroups.Any(i => i != item && i.Name.IsCaseInsensitiveEqual(assetItemGroup.Name)));
            }

            return(false);
        }