Skip to content

Releases: tommasobertoni/IsAwaitable

v1.3.1

06 Dec 19:34
Compare
Choose a tag to compare
Adds logo.

v1.3.0

30 Nov 11:02
29e46ce
Compare
Choose a tag to compare

Introduces Awaitable and AwaitableDescription:

using IsAwaitable.Analysis;

_ = Awaitable.Describe("hello");
// null

var description = Awaitable.Describe(typeof(MyCustomAwaitableType));
if (description is not null)
{
    var resultType = description.ResultType;
}

var taskDescription = Awaitable.Describe<Task>();
var isKnownAwaitable = taskDescripti.IsKnownAwaitable;

v1.2.0

27 Oct 11:14
Compare
Choose a tag to compare

Introduce methods that also return the Type of the result:

using System.Threading.Tasks;

bool IsAwaitableWithResult(this object instance, out Type resultType);
bool IsAwaitableWithResult(this Type type, out Type resultType);
using IsAwaitable;

bool IsKnownAwaitableWithResult(this object? instance, out Type resultType);
bool IsKnownAwaitableWithResult(this Type type, out Type resultType);

Targets netstandard2.0.

v1.1.0

14 Oct 08:00
Compare
Choose a tag to compare

Added extension method for checking if a type or instance is both awaitable and returns a result:

bool IsAwaitableWithResult(this object? instance);
bool IsAwaitableWithResult(this Type type);

v1.0.1

10 Oct 12:42
Compare
Choose a tag to compare

Improved evaluation performances by using a cache and known types short-circuit.

v1.0.0

08 Oct 08:54
Compare
Choose a tag to compare

Provides extension method IsAwaitable returning true when the instance or type definition can be awaited.
The algorithm follows the c# language specification for awaitable expressions.