Commit Graph

183 Commits

Author SHA1 Message Date
Oliver Booth 3a46d58210 (#28) Use bit manipulation for ReadDecimal
Array.Copy is slightly more inefficient than direct bit shift
2021-03-03 19:09:20 +00:00
Oliver Booth 34ee60437b (#28) Add floating point read support
Introduces:
- ReadDecimal([Endianness])
- ReadDouble([Endianness])
- ReadSingle([Endianness])
2021-03-03 18:39:38 +00:00
Oliver Booth ba71f814c0 (#15) (#28) Fix xmldoc wording for Read methods
Methods previously read "Writes [...] to" instead of "Reads [...] from"
2021-03-03 18:37:43 +00:00
Oliver Booth e7ba24aa69 Mark ReadUInt* methods with CLSCompliantAttribute 2021-03-03 17:51:30 +00:00
Oliver Booth e0b19aff99 (#15) Match Read documentation with Write methods 2021-03-03 16:05:57 +00:00
Oliver Booth 1ca85cc3cd (#28) (#29) Add missing exception resources 2021-03-03 14:50:48 +00:00
Oliver Booth 99fd511714 (#28) (#29) BinaryReader/Writer Stream extensions
Introduces type:
- Endianness

Introduces Read methods:
- ReadInt16
- ReadInt32
- ReadInt64
- ReadUInt16
- ReadUInt32
- ReadUInt64

Introduces Write methods:
- Write(short)
- Write(int)
- Write(long)
- Write(ushort)
- Write(uint)
- Write(ulong)

Introduces internal "Util" class to provide internal-only helper methods
- SwapIfNeeded (reverse a buffer on Endianness mismatch)
2021-03-03 14:46:24 +00:00
Oliver Booth ef9dc29e42 (#7) Move StreamExtensions to child namespace 2021-03-03 14:41:15 +00:00
Oliver Booth 8e70823241 #30 Use .NET Core gitignore
https://github.com/dotnet/core/blob/main/.gitignore
2021-03-03 14:32:00 +00:00
Oliver Booth afaacb13e5 (#27) Move exception messages to resource file 2021-03-01 13:41:08 +00:00
Oliver Booth 8e763667d0 (#7) Move EnumerableExtensions to child namespace 2021-03-01 13:37:32 +00:00
Oliver Booth 2ae1c3e249 🚚 Move EndPointExtensions to child namespace 2021-01-20 22:13:40 +00:00
Oliver Booth 9db0249790 Use IEnumerable<KeyValuePair<>> over Dictionary
Also relocate to child namespace.

Resolves #8 and is item for #7
2021-01-18 22:02:58 +00:00
Oliver Booth 31d1dc21df Add DateTimeOffsetExtensions
Supersedes DateTimeExtensions. Resolves #26
2021-01-18 21:01:02 +00:00
Oliver Booth 31e4574732 🚚 Move RandomExtensions to child namespace
Item for #7
2021-01-18 17:00:40 +00:00
Oliver Booth 28f46ecc8d Type/MemberInfo extension parity
Also resolves #25
2021-01-18 16:55:43 +00:00
Oliver Booth f980ade3a8 🚚 Move ReflectionExtensions to child namespace
Item for #7
2021-01-18 16:38:36 +00:00
Oliver Booth 16f0a8a869 🧹 Code cleanup and XMLdoc fix 2021-01-18 15:26:14 +00:00
Oliver Booth 605db2b5a8 🚚 Move ListExtensions to child namespace
Item for #7
2021-01-18 15:22:37 +00:00
Oliver Booth 51ba5b0115 🚚 Rename List.OneOf to List.Random
Item for #21
2021-01-18 15:19:59 +00:00
Oliver Booth 1b80267238 🚚 Rename Random.OneOf to Random.NextFrom
Item for #21
2021-01-18 15:19:23 +00:00
Oliver Booth dd66fb9a2b Add IComparable<T>.Clamp
Implements #24
2021-01-17 13:31:59 +00:00
Oliver Booth b25ca501d9 🧹 Un-partialify ComparableExtensions 2021-01-17 13:31:36 +00:00
Oliver Booth 3c00899d27 🧹 Fix typo in Max() xmldoc 2021-01-17 13:23:35 +00:00
Oliver Booth ac8aead71d Add IComparable<T> Max and Min
Implements #23
2021-01-17 13:21:56 +00:00
Oliver Booth 2a05cb6670 Add IComparable "operators"
Implements #22
2021-01-17 13:07:43 +00:00
Oliver Booth de8a237f99 🚚 Move ComparableExtensions to child namespace
Item for #7 and #15
2021-01-17 12:50:23 +00:00
Oliver Booth 96f68343ce 🔧 Consolidate methods into sensible partials 2021-01-17 12:48:19 +00:00
Oliver Booth 17f6a05c48 🚚 Move BooleanExtensions to child namespace
Item for #15, #17 and #19
2021-01-17 02:37:59 +00:00
Oliver Booth db5512db59 🐎 De-Linqify ToConnectionString
Item for #12
2021-01-17 00:52:01 +00:00
Oliver Booth 3ad20fdb40 🐞 Fix for #20
Sanitize string input, rather than T. Call ToString() on dictionary value
2021-01-17 00:36:28 +00:00
Oliver Booth 6f26c04f6c 🚚 Rename StructExtensions to EnumExtensions 2021-01-16 15:06:48 +00:00
Oliver Booth 0512d7d568 Add IEnumerable<T>.Shuffled()
Shuffled() wraps Shuffle() and returns a new collection as the result.
Continuation of #18
2021-01-16 14:18:17 +00:00
Oliver Booth 9238459851 🐎 Implement Fisher-Yates for IList<T>.Shuffle()
Resolves #18 but leaves string.Shuffle unable to be compiled for now
2021-01-16 14:07:49 +00:00
Oliver Booth db43993d56 🚚 Rename Random.CoinToss() to Random.NextBoolean()
Fixes #17 and part of #15
2021-01-16 13:54:42 +00:00
Oliver Booth bbfdf39d09 🎨 Move using directives to outside-namspace
Item for #14

editorconfig:
csharp_using_directive_placement=outside_namespace:error
2021-01-16 13:43:47 +00:00
Oliver Booth 13bd4b7fe1 🗑 Remove SecureString methods
Resolves #16
2021-01-16 13:21:28 +00:00
Oliver Booth 568f272c34 🔧 Implement To(Numeric) conversion for byte
Instead of for int - other overloads now call ToByte and implicitly cast
2021-01-16 13:15:28 +00:00
Oliver Booth c063ef6af4 🗑 Remove bool logical operator methods
Resolves #6
2021-01-15 01:55:15 +00:00
Oliver Booth dee28392e3 📚 Fix 2.6.0 "Added" heading in CHANGELOG 2021-01-14 18:34:24 +00:00
Oliver Booth f7664ba8a8 🗑 Remove IConvertible extension methods
Fully resolves #13
2021-01-14 18:31:16 +00:00
Oliver Booth b7514fdead 🐎 Improve performancee on string.IsLower()
Item for #12
2021-01-14 18:18:52 +00:00
Oliver Booth 16fb54da31 🐎 Improve performancee on string.IsUpper()
Item for #12
2021-01-14 18:18:30 +00:00
Oliver Booth 14f600666b 🐎 Improve performance for string.Reverse
Item for #12
2021-01-14 17:09:39 +00:00
Oliver Booth 43e49d4826 Add .NET 5 support
Fixes #9
2021-01-14 16:43:21 +00:00
Oliver Booth bb1715a0a7 🐞 Add tag link for 2.6.0 heading
Fixes #11
2021-01-14 16:14:20 +00:00
Oliver Booth da4ec4cfc3 📚 Update CHANGELOG 2021-01-14 16:10:59 +00:00
Oliver Booth 8713821b8b
📚 Fix "dogfooding" definition link
Fix for #5
2021-01-03 13:30:19 +00:00
Oliver Booth 88eb4c0350 🏷 Bump to 2.6.0 2020-10-20 15:11:21 +01:00
Oliver Booth 01275e9c92 🛠 Enable NRT for X10D project 2020-10-20 15:09:48 +01:00