Skybrud.Essentials v1.1.31
Installation
Changelog
-
Introduced new
GetFlags
enum extension method (see a8fdbd2)
The newGetFlags
method takes a enum value with the[Flags]
attribute and returns each flag individual instances. -
Introduced new utility and extension methods for converting a collection of enums to a given case (see a8fdbd2)
The package already contains methods for converting a single enum value to a textual representation using given case. The new methods takes a collection of enum values, and returns a comma separated string with the textual representation of each enum value in the collection. -
Introduced new
ToHashSet
extension methods (see e6816e3)
The two extension methods allow for method chaining, which may make code more readable - opposed to having to call theHashSet<T>
constructor manually. -
Added new
EnumerableExtensions.GetReverse
extension method for getting the opposite value of aSortOrder
value (see 6b078ee)
Allows turningSortOrder.Ascending
intoSortOrder.Descending
, orSortOrder.Descending
intoSortOrder.Ascending
. -
Introduced new StringUtils.FirstWithValue utility methods (see 0d434c9 and de4e191)
Both overloads return the first value that is not either null, empty or whitespace. -
Introduced new
StringExtensions.Join
extension methods for theSystem.String
class (see 2fb0d42)
Using the extension methods instead of thestring.Join
method allows for method chaining. -
Fixed indices typo for
StringUtils.ToPlural
andStringUtils.ToSingular
methods (see e5f04b1)
The word indices was incorrectly spelled indeces - also in the unit tests, resulting in this issue going unnoticed until now. -
Introduced
StringUtils.ToPlural
method overloads (see d0965fb)
The two new methods allow specifying either a count or a boolean to indicate whether the returned value should be plural or singular.