Exemple #1
0
        public static IEnumerable<Uri> GetReferences(this BundleEntry entry, string include)
        {
            Resource resource = (entry as ResourceEntry).Resource;
            ElementQuery query = new ElementQuery(include);
            var list = new List<Uri>();

            query.Visit(resource, element =>
            {
                if (element is ResourceReference)
                {
                    Uri uri = (element as ResourceReference).Url;
                    if (uri != null) list.Add(uri);
                }
            });
            return list.Where(u => u != null);
        }
Exemple #2
0
        public static IEnumerable <Uri> GetReferences(this BundleEntry entry, string include)
        {
            Resource     resource = (entry as ResourceEntry).Resource;
            ElementQuery query    = new ElementQuery(include);
            var          list     = new List <Uri>();

            query.Visit(resource, element =>
            {
                if (element is ResourceReference)
                {
                    Uri uri = (element as ResourceReference).Url;
                    if (uri != null)
                    {
                        list.Add(uri);
                    }
                }
            });
            return(list.Where(u => u != null));
        }