Example #1
0
 //
 // iterage all page masks, returning them via the delegate callback
 //
 public void IterateMasks(ReturnMask retDelegate)
 {
     foreach (KeyValuePair <PageCoord, byte[]> kvp in pages)
     {
         retDelegate(kvp.Key, kvp.Value);
     }
 }
Example #2
0
        //
        // Iterate page masks, only returning those in the given page range
        //
        public void IterateMasks(ReturnMask retDelegate, PageCoord minPage, PageCoord maxPage)
        {
            // get out quick if our bounds don't overlap the requested page range
            if ((minPageX > maxPage.X) || (maxPageX < minPage.X) || (minPageZ > maxPage.Z) || (maxPageZ < minPage.Z))
            {
                return;
            }
            foreach (KeyValuePair <PageCoord, byte[]> kvp in pages)
            {
                PageCoord pc = kvp.Key;

                // only call delegate if current page overlaps with requested page range
                if ((pc.X >= minPage.X) && (pc.X <= maxPage.X) && (pc.Z >= minPage.Z) && (pc.Z <= maxPage.Z))
                {
                    retDelegate(pc, kvp.Value);
                }
            }
        }
        //
        // Iterate page masks, only returning those in the given page range
        //
        public void IterateMasks(ReturnMask retDelegate, PageCoord minPage, PageCoord maxPage)
        {
            // get out quick if our bounds don't overlap the requested page range
            if ((minPageX > maxPage.X) || (maxPageX < minPage.X) || (minPageZ > maxPage.Z) || (maxPageZ < minPage.Z))
            {
                return;
            }
            foreach (KeyValuePair<PageCoord, byte[]> kvp in pages)
            {
                PageCoord pc = kvp.Key;

                // only call delegate if current page overlaps with requested page range
                if ((pc.X >= minPage.X) && (pc.X <= maxPage.X) && (pc.Z >= minPage.Z) && (pc.Z <= maxPage.Z))
                {
                    retDelegate(pc, kvp.Value);
                }
            }
        }
 //
 // iterage all page masks, returning them via the delegate callback
 //
 public void IterateMasks(ReturnMask retDelegate)
 {
     foreach (KeyValuePair<PageCoord, byte[]> kvp in pages)
     {
         retDelegate(kvp.Key, kvp.Value);
     }
 }