kelindar / spike-build

Spike.Build is the set of libraries that perform parsing and code-generation for creating various client SDKs for Spike Engine.
http://www.spike-engine.com
GNU General Public License v3.0
15 stars 7 forks source link

Specific handlers for Pull requests on C# 5 builder #6

Open kelindar opened 9 years ago

kelindar commented 9 years ago

Would be nice to generate Tasks for Pull requests, allowing for task continuation and awaiting on them. I would only have this in C# 5 builder, as a "nice to have" kind of feature.

We would generate something like this, with request functions being queued/dequeued in order.

client.Ping("pong1", (re) => {
  ...
});

client.Ping("pong2", (re) => {
  ...
});

client.Ping("pong3", (re) => {
  ...
});

This is suggested design, more ideas are welcome.

kelindar commented 9 years ago

Another thought it that it could return a Task, this would allow us to:

Simply awaiting on it.

var result = await client.Ping("pong1");

Building data dependency chains.

client.Ping("pong1")
      .ContinueWith(t => ...);