Commit 940895ae authored by Brickner_cp's avatar Brickner_cp

HTTP

parent ed97ea2a
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
......@@ -20,5 +21,12 @@ namespace PcapDotNet.Base
{
return new ReadOnlyCollection<T>(list);
}
public static IEnumerable<T> Range<T>(this IList<T> list, int offset, int count)
{
int length = Math.Min(offset + count, list.Count);
for (int i = offset; i < length; ++i)
yield return list[i];
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment