Пример #1
0
        IEnumerable <AssetReference> GetNonSameBundleAssetReferences(Bundle bundle)
        {
            var collector = new BundleReferenceCollector(AssetReferenceType.DifferentBundle, AssetReferenceType.Url);

            bundle.Accept(collector);
            return(collector.CollectedReferences.Select(r => r.AssetReference));
        }
Пример #2
0
        void ValidateAssetReferences()
        {
            var collector = new BundleReferenceCollector(AssetReferenceType.DifferentBundle);

            foreach (var bundle in bundles)
            {
                bundle.Accept(collector);
            }
            var notFound = from reference in collector.CollectedReferences
                           where !reference.SourceBundle.IsFromDescriptorFile &&
                           NoBundlesContainPath(reference.AssetReference.ToPath)
                           select CreateAssetReferenceNotFoundMessage(reference.AssetReference);

            var message = string.Join(Environment.NewLine, notFound.ToArray());

            if (message.Length > 0)
            {
                throw new AssetReferenceException(message);
            }
        }
Пример #3
0
 IEnumerable<AssetReference> GetNonSameBundleAssetReferences(Bundle bundle)
 {
     var collector = new BundleReferenceCollector(AssetReferenceType.DifferentBundle, AssetReferenceType.Url);
     bundle.Accept(collector);
     return collector.CollectedReferences.Select(r => r.AssetReference);
 }
Пример #4
0
        void ValidateAssetReferences()
        {
            var collector = new BundleReferenceCollector(AssetReferenceType.DifferentBundle);
            foreach (var bundle in Bundles)
            {
                bundle.Accept(collector);
            }
            var notFound = from reference in collector.CollectedReferences
                           where !reference.SourceBundle.IsFromDescriptorFile
                              && NoBundlesContainPath(reference.AssetReference.Path)
                           select CreateAssetReferenceNotFoundMessage(reference.AssetReference);

            var message = string.Join(Environment.NewLine, notFound);
            if (message.Length > 0)
            {
                throw new AssetReferenceException(message);
            }
        }
Пример #5
0
        void ValidateAssetReferences()
        {
            var collector = new BundleReferenceCollector(AssetReferenceType.DifferentBundle);
            foreach (var bundle in Bundles)
            {
                bundle.Accept(collector);
            }
            var notFound = from reference in collector.CollectedAssetReferences
                           where bundles.Any(m => m.ContainsPath(reference.Path)) == false
                           select CreateAssetReferenceNotFoundMessage(reference);

            var message = string.Join(Environment.NewLine, notFound);
            if (message.Length > 0)
            {
                throw new AssetReferenceException(message);
            }
        }