Myce.Extensions 0.5.1

dotnet add package Myce.Extensions --version 0.5.1                
NuGet\Install-Package Myce.Extensions -Version 0.5.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Myce.Extensions" Version="0.5.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Myce.Extensions --version 0.5.1                
#r "nuget: Myce.Extensions, 0.5.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Myce.Extensions as a Cake Addin
#addin nuget:?package=Myce.Extensions&version=0.5.1

// Install Myce.Extensions as a Cake Tool
#tool nuget:?package=Myce.Extensions&version=0.5.1                

MYCE.Extensions

MYCE (Makes Your Coding Easier) is a Nuget package for Visual Studio that contains a set of extensions for the most common types.

Library

  • CollectionExtensions

    • AddIfNotNull() - Add an item to a collection if the item is not null
    • AddRangeIfHasData() - Add a collection of items to a collection if the collections of items has data
  • DateTimeExtension

    • FirstDayOfMonth() - Return the first day of the mounth for a given date
    • DaysInMonth() - Return the number of days in the mounth for a given date
    • LastDayOfMonth() - Return the last day of the mounth for a given date
    • IsLeapYear() - Returns true if the date is in a leap year
    • IsWorkDay() - Return true if the date is a workday (Monday to Friday)
    • IsWeekend() - Return true if the date is a weekend (Saturday or Sunday). Holidays are not taken into account.
    • PriorWorkday() - Return the prior workday (Monday to Friday) for a given date. Holidays are not taken into account.
    • NextWorkday() - Return the next workday (Monday to Friday) for a given date. Holidays are not taken into account.
    • Yesterday() - Return yesterday's date
    • Tomorrow() - Return oomorrow's date
  • DecimalExtension

    • EqualZero() - Return true if the value is equal zero
    • GreaterThanZero() - Return true if the value is greater than zero
    • GreaterThanOrEqualZero() - Return true if the value is greater than or equal zero
    • LessThanZero() - Return true if the value is less than zero
    • LessThanOrEqualZero() - Return true if the value is less than or equal zero
  • DoubleExtension

    • EqualZero() - Return true if the value is equal zero
    • GreaterThanZero() - Return true if the value is greater than zero
    • GreaterThanOrEqualZero() - Return true if the value is greater than or equal zero
    • LessThanZero() - Return true if the value is less than zero
    • LessThanOrEqualZero() - Return true if the value is less than or equal zero
  • EnumerableExtensions

    • Chunk() - Splits an enumerable into chunks of a specified size
    • ContainsDuplicates() - Return true the if the enumerable constains a duplicate element
    • DistinctRowsBy() - Return an enumerable of elements distinct by specific property
    • ForEach<T>() - The foreach loop
    • GetDuplicates() - Return the duplicate elements in an enumerable
    • HasData() - Return true the if the enumerable object is not null and has any record
    • IsNullOrEmpty() - Return true if the enumerable is not null and has any record
  • EnumExtensions

    • GetDescription() - Return the enumerator description as a string
  • GuidExtension

    • IsEmpty() - Return true if the guid is empty
    • IsNotEmpty() - Return true if the guid is not empty
  • IntegerExtension

    • EqualZero() - Return true if the value is equal zero
    • GreaterThanZero() - Return true if the value is greater than zero
    • GreaterThanOrEqualZero() - Return true if the value is greater than or equal zero
    • LessThanZero() - Return true if the value is less than zero
    • LessThanOrEqualZero() - Return true if the value is less than or equal zero
  • ObjectExtension

    • IsBetween() - Compare object values is between other two values (inclusive)
    • IsNull() - Check if the value of the object is null
    • IsNotNull() - Check if the value of the object is not null
  • StringExtension

    • EmptyIfIsNull() - Return an empty string if the string is null
    • KeepOnlyNumbers() - Remove letters and simbols, keeping only numbers
    • KeepOnlyNumbersAndLetters() - Remove simbols keeping only numbers and letters
    • KeepOnlyNumbersAndLettersAndSpaces() - Remove simbols keeping only numbers, letters and spaces
    • RemoveSimbols() Remove simbols keeping only numbers, letters and spaces (if asked)
    • RemoveAccents() - Remove accents
    • ToEnum() - Converts string to Enum object

Notes

  • In version 0.5.1 the Enumerable Extension DistinctBy was renamed to DistinctRowsBy to avoid the exception "CS0121 The call is ambiguous between the following methods or properties...".

Dependencies

  • None

Developed by Fernando Prass

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Myce.Extensions:

Package Downloads
Myce.Response

MYCE (Makes Your Coding Easier) Response is a response object to handle Error, Warning and Information messages

Myce.Validation

MYCE (Makes Your Coding Easier) Validation is fluent validation class

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.5.1 108 6/3/2024
0.5.0 153 9/24/2023
0.4.0 173 7/23/2023
0.3.0 206 4/12/2023
0.2.7 230 3/26/2023
0.2.6 236 3/13/2023
0.2.5 261 2/27/2023
0.2.0 253 2/26/2023
0.1.3 239 2/18/2023
0.1.2 314 1/30/2023
0.1.1 297 1/27/2023
0.1.0 503 1/21/2023
0.0.1 295 1/20/2023