james-white submitted these extension methods

  • Return<TIn, TOut>

    A 'fluent' logic extension method that takes a value (can be anything) and a function that returns another value (can be anything) based on its logic. This is useful for both evaluating and optionally returning a value without declaring a temporary variable for the value.
    C# System.Object James White
  • TimesOrUntil

    Attempts to retrieve a valid a result from your function one or more times with an optional 'in between' step (i.e. delay). Replaces a common code pattern with a more readable, shared pattern.
    C# System.Int32 James White