Heleonix.Extensions 1.0.0

Provides predicative and other useful extensions for objects, strings, enumerables etc.

Install-Package Heleonix.Extensions -Version 1.0.0
dotnet add package Heleonix.Extensions --version 1.0.0
<PackageReference Include="Heleonix.Extensions" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Heleonix.Extensions --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Heleonix.Extensions

Provides predicative and other useful extensions for objects, strings, enumerables etc.

Install

https://www.nuget.org/packages/Heleonix.Extensions

These extensions do not throw exceptions, so they can be used without try/catch blocks or extra if statements.
All of the extensions are straightforward, so descriptions provided by intellisense is pretty enough.

Heleonix.Extensions.ObjectExtensions

Methods

  • public static bool IsNull(this object instance)

  • public static bool IsZero(this object instance)

  • public static bool IsOne(this object instance)

  • public static bool IsNegative(this object instance)

  • public static bool IsPositive(this object instance)

  • public static bool IsEqualTo(this object instance, object other)

  • public static bool IsAs(this object instance, Type type)

    Determines whether this instance is subclass of or exactly the specified type.

  • public static bool IsTypeOf(this object instance, Type type)

    Determines whether a type of this instance exactly equals the specified type.

Heleonix.Extensions.EnumerableExtensions

Methods

  • public static bool IsEmpty&lt;T&gt;(this IEnumerable&lt;T&gt; instance)

  • public static bool IsNullOrEmpty&lt;T&gt;(this IEnumerable&lt;T&gt; instance)

Heleonix.Extensions.ComparableExtensions

Methods

  • public static bool IsLessThan&lt;T&gt;(this IComparable&lt;T&gt; instance, T value)

  • public static bool IsLessThanOrEqualTo&lt;T&gt;(this IComparable&lt;T&gt; instance, T value)

  • public static bool IsGreaterThan&lt;T&gt;(this IComparable&lt;T&gt; instance, T value)

  • public static bool IsGreaterThanOrEqualTo&lt;T&gt;(this IComparable&lt;T&gt; instance, T value)

  • public static bool IsInRange&lt;T&gt;(this IComparable&lt;T&gt; instance, T min, T max)

    Determines whether this instance is in range (inclusive) of the provided values.

  • public static bool IsBetween&lt;T&gt;(this IComparable&lt;T&gt; instance, T min, T max)

    Determines whether this instance is between (exclusive) the provided values.

Heleonix.Extensions.StringExtensions

Methods

  • public static string FormatWith(this string format, params object[] args)

    Formats the specified format string with the specified arguments.

    Example
    var str = "{0} plus {1} equals {2}".FormatWith(1, 2, 3);
    
    // "1 plus 2 equals 3"
    
  • public static string FormatWith(this string format, IFormatProvider formatProvider, params object[] args)

    Formats the specified format string with the specified arguments using a specified format provider.

  • public static bool IsNullOrEmptyOrWhiteSpace(this string instance)

Heleonix.Extensions

Provides predicative and other useful extensions for objects, strings, enumerables etc.

Install

https://www.nuget.org/packages/Heleonix.Extensions

These extensions do not throw exceptions, so they can be used without try/catch blocks or extra if statements.
All of the extensions are straightforward, so descriptions provided by intellisense is pretty enough.

Heleonix.Extensions.ObjectExtensions

Methods

  • public static bool IsNull(this object instance)

  • public static bool IsZero(this object instance)

  • public static bool IsOne(this object instance)

  • public static bool IsNegative(this object instance)

  • public static bool IsPositive(this object instance)

  • public static bool IsEqualTo(this object instance, object other)

  • public static bool IsAs(this object instance, Type type)

    Determines whether this instance is subclass of or exactly the specified type.

  • public static bool IsTypeOf(this object instance, Type type)

    Determines whether a type of this instance exactly equals the specified type.

Heleonix.Extensions.EnumerableExtensions

Methods

  • public static bool IsEmpty&lt;T&gt;(this IEnumerable&lt;T&gt; instance)

  • public static bool IsNullOrEmpty&lt;T&gt;(this IEnumerable&lt;T&gt; instance)

Heleonix.Extensions.ComparableExtensions

Methods

  • public static bool IsLessThan&lt;T&gt;(this IComparable&lt;T&gt; instance, T value)

  • public static bool IsLessThanOrEqualTo&lt;T&gt;(this IComparable&lt;T&gt; instance, T value)

  • public static bool IsGreaterThan&lt;T&gt;(this IComparable&lt;T&gt; instance, T value)

  • public static bool IsGreaterThanOrEqualTo&lt;T&gt;(this IComparable&lt;T&gt; instance, T value)

  • public static bool IsInRange&lt;T&gt;(this IComparable&lt;T&gt; instance, T min, T max)

    Determines whether this instance is in range (inclusive) of the provided values.

  • public static bool IsBetween&lt;T&gt;(this IComparable&lt;T&gt; instance, T min, T max)

    Determines whether this instance is between (exclusive) the provided values.

Heleonix.Extensions.StringExtensions

Methods

  • public static string FormatWith(this string format, params object[] args)

    Formats the specified format string with the specified arguments.

    Example
    var str = "{0} plus {1} equals {2}".FormatWith(1, 2, 3);
    
    // "1 plus 2 equals 3"
    
  • public static string FormatWith(this string format, IFormatProvider formatProvider, params object[] args)

    Formats the specified format string with the specified arguments using a specified format provider.

  • public static bool IsNullOrEmptyOrWhiteSpace(this string instance)

Release Notes

Split from the Heleonix.Utilities

  • .NETFramework 4.5

    • No dependencies.
  • .NETFramework 4.5.1

    • No dependencies.
  • .NETFramework 4.5.2

    • No dependencies.
  • .NETFramework 4.6

    • No dependencies.
  • .NETFramework 4.6.1

    • No dependencies.
  • .NETFramework 4.6.2

    • No dependencies.
  • .NETStandard 1.6

  • .NETStandard 2.0

    • No dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.0 264 6/22/2018