This library contains a few tools we use on a regular basis during internal development. Feature list:
-
- MaxAttribute - Ensures a parameter is less than or equal to the specified value
- MinAttribute - Ensures a parameter is greater than or equal to the specified value
- WithinRangeAttribute - Ensures a parameter is within the specified range (inclusive)
-
- Add KeyValuePair
- AddRange - Accepts Dictionary<TKey, TValue>
- TryAdd (
TKey
,TValue
) or (KeyValuePair<TKey, TValue>
)
-
EnumTools
- ParseFromValue -- Converts a long value into an enum of the specified types. Known Issues: Does not work with flag enums
-
FileSize -- A conversion library which converts file sizes (in bytes)
-
- Deconstruct (up to 5 values) using
(string firstName, string lastName) = "John Doe".Split(' ');
or similar.
- Deconstruct (up to 5 values) using
-
- Contains -- Returns whether the string contains the specified substring
- TruncateTo -- Ensures a string is, at max, the specified length
- ExpandTo -- Ensures the string is at least the specified length, appending spaces if it is not.
- LeftString
- RightString
-
Shell -- Provides tool for advanced console operations.
-
Discord -- An extension library for Discord.NET
- SocketGuild Extensions
- IsMemberOf - Returns a boolean representing whether a
SocketGuildUser
is a member of the specified role.
- IsMemberOf - Returns a boolean representing whether a
- SocketGuild Extensions