Skip to content

LuzFaltex/LuzFaltex.Utilities

Repository files navigation

LuzFaltex.Utilities

This library contains a few tools we use on a regular basis during internal development. Feature list:

  • Attributes

    • 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)
  • Dictionary Extensions

    • 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)

  • Generic Extensions

    • Deconstruct (up to 5 values) using (string firstName, string lastName) = "John Doe".Split(' '); or similar.
  • String Extensions

    • 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.

About

A utility library for some commonly-used functions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages