mhinze / ShortBus

In-process mediator with low-friction API
MIT License
210 stars 41 forks source link

Removing non-async methods? #16

Closed mhinze closed 10 years ago

mhinze commented 10 years ago
public interface IMediator
{
  Task<Response<TResult>> RequestAsync<TResult>(IAsyncQuery<TResult> query);
  Task<Response<TResult>> SendAsync<TResult>(IAsyncCommand<TResult> command);
}

If this is acceptable, what about this?

public interface IMediator
{
  Task<Response<TResult>> HandleAsync<TResult>(IOperation<TResult> op);
}
zachariahyoung commented 10 years ago

Would this still work if you only had .net 4.0? I have not worked with async in .net 4.5 yet.

Also I think we should add something for eventhandlers.

mhinze commented 10 years ago

I do not know what .net 4.0 is like with Shortbus. I am open to PRs that let us take advantage of the nuget multiple framework version support stuff. I don't think I have a machine without 4.5 on it at this point.

zachariahyoung commented 10 years ago

Are you running VS 12 or 13? All I have is VS 10 and I would like to contribute to the project so maybe I can check out VS express.

Maybe somebody has a free MSDN license for me. :)

zachariahyoung commented 10 years ago

@mhinze So what's your thinking on this? Maybe we could have a HandleAsync and Handle.

mhinze commented 10 years ago

We're still exploring and using ICommand so.. we'll get here but I dont feel pressure to move fast. I think the best approach is to support multiple framework versions via nuget but I dont have it in me to work on that this week. A little swamped.