Visual Studio Team Services

Asynchronous TFS Queries and the .Net TPL

Microsoft’s Task Parallel Library (short: TPL) has a nice set of functionality to use the traditional Begin/EndInvoke pattern a.k.a. the Asynchronous Programming Model (short: APM), namely their .FromAsync(…) methods.

Instances of a Team Foundation Query, more precisely the Microsoft.TeamFoundation.WorkItemTracking.Client.Query ones, do have a closely related APM method implementation called Query.BeginQuery(..) and Query.EndQuery(…), but as I said.. it’s only closely related.

Enthusiastically I tried hooking up the later with the aforementioned TPL .FromAsync(..) methods and its overloads but soon realized, it does not quite fit together. Digging around I came across exactly one post on that explains and provides a wrapper for this exact problem.

Moreover & quite conveniently, the author Stephen Cleary also added the provided solution to his Nito.AsyncEx library. Thanks Stephen!


Comments disabled.