FilterList() public static method

Filters a list of Chunks, keeping those which match the predicate
The original list is not altered
public static FilterList ( List list, ChunkPredicate predicateKeep ) : List
list List
predicateKeep ChunkPredicate
return List
Esempio n. 1
0
 internal static List <PngChunk> GetXById(List <PngChunk> list, string id, string innerid)
 {
     if (innerid == null)
     {
         return(ChunkHelper.FilterList(list, new ChunkPredicateId(id)));
     }
     return(ChunkHelper.FilterList(list, new ChunkPredicateId2(id, innerid)));
 }
Esempio n. 2
0
 /// <summary>
 /// Finds all chunks "equivalent" to this one
 /// </summary>
 /// <param name="chunk"></param>
 /// <returns>Empty if nothing found</returns>
 public List <PngChunk> GetEquivalent(PngChunk chunk)
 {
     return(ChunkHelper.FilterList(chunks, new ChunkPredicateEquiv(chunk)));
 }