Skip to content

Parameter validation - 1.3.1

Choose a tag to compare

@BlueCyro BlueCyro released this 25 Apr 05:35
· 13 commits to main since this release
159134d

This release includes some changes to how parameters are copied with FromOther() and allows you to now validate parameters to make sure users don't explode their ears.

  • Changed FromOther<T>(T zita, IZitaFilter other) to FromOther<TFrom, TTo>(TFrom zita, TTo other) instead of always requiring an object of type IZitaFilter`.
    • This allows you to avoid boxing should you decide to use something like the ZitaParameters struct with it now.
  • Added EnsureValidParameters() extension method so that you can validate input parameters given to an IZitaFilter type.
    • Also adds EnsureValidNum() extension method to validate floats with an optional fallback value.

Enjoy!