Revision 759bd3c4 trunk/Pithos.Core/Agents/CollectionExtensions.cs

b/trunk/Pithos.Core/Agents/CollectionExtensions.cs
40 40
 */
41 41
#endregion
42 42
using System.Collections.Concurrent;
43
using Pithos.Interfaces;
43 44

  
44 45
namespace Pithos.Core.Agents
45 46
{
......
81 82

  
82 83
            queue.AddFromEnumerable(temp);
83 84
        }
85

  
86

  
87
        public static IEnumerable<ObjectInfo> FilterBelow(this IEnumerable<ObjectInfo> infos,List<Uri> filterUris  )
88
        {
89
            if (filterUris == null)
90
                return infos;
91
            if (filterUris.Count == 0)
92
                return infos;
93
            var filteredUris = from info in infos
94
                                  where !filterUris.Any(s => info.Uri.ToString()
95
                                      .StartsWith(s.ToString()))
96
                                  select info;
97
            return filteredUris;
98
        }
84 99
    }
85 100
}

Also available in: Unified diff