http://www.yoda.arachsys.com/csharp/index.html
先记下来,有空仔细研究一下.里面的一些工具类很实用.如:属性Copy器,ThreadController,CustomThreadPool,StringWriterWithEncoding.
The library currently contains the following items:
- MiscUtil.StaticRandom - random number generation made simple. (Static members wrapping System.Random.) See the usage page for details.
- MiscUtil.IBufferManager (and implementations) - buffer management, for code which frequently needs to make temporary use of byte arrays. See the usage page for details.
- MiscUtil.Checksum - namespace for checksum algorithms. (Currently only Adler32 supported.)
- MiscUtil.Collections.ComparisonComparer<T> - conversions between
Comparison<T>
andComparer<T>
- MiscUtil.Collections.Range<T> - generic range support (work in progress)
- MiscUtil.Collections.SmartEnumerable<T> - enumerates over a collection, retaining information about whether or not you're on the first/last entry. See the usage page for details.
- MiscUtil.Compression.Vcdiff - support for decoding VCDIFF (RFC 3284) binary diff files. See the usage page for details.
- MiscUtil.Text.Utf32String - contains much of
System.String
, but with a UTF-32 encoding (rather than UTF-16). This means surrogate pairs are counted as a single character. - MiscUtil.Conversion.DoubleConverter - code to show the full true value of a double.
- MiscUtil.Conversion.EndianBitConverter - effectively BitConverter, but either LittleEndian or BigEndian, depending on which you pick.
- MiscUtil.IO.EndianBinary{Writer/Reader} - like System.IO.Binary{Writer.Reader}, but with configurable endianness.
- MiscUtil.IO.StreamUtil - utility methods to make it easier to work with streams. See the usage page for details.
- MiscUtil.IO.StringWriterWithEncoding - like System.IO.StringWriter, but with configurable encoding. (This is useful for XML output.)
- MiscUtil.Threading.CustomThreadPool - a simple configurable thread pool, allowing you to separate your own threads from the ones in the system thread pool.
- MiscUtil.Threading.ThreadController - a simple control system for worker threads
- MiscUtil.Threading.{SyncLock,OrderedLock,LockToken} - an alternative locking mechanism. See the usage page for details.