Skip to content

Instantly share code, notes, and snippets.

@phatboyg
Created July 6, 2012 18:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phatboyg/3061985 to your computer and use it in GitHub Desktop.
Save phatboyg/3061985 to your computer and use it in GitHub Desktop.
SignalR MT Integration Post
public class Location :
Hub
{
public Task GetLocation(string truckId)
{
Task task = null;
Bus.Instance.PublishRequestAsync(new GetLocation { TruckId = truckId }, x =>
{
task = x.Handle(message => {});
x.SetTimeout(30.Seconds());
});
return task;
}
}
public class Location :
Hub
{
public Task GetLocation(string truckId)
{
Task task = null;
Bus.Instance.PublishRequestAsync(new GetLocation { TruckId = truckId }, x =>
{
task = x.Handle(message => {});
x.SetTimeout(30.Seconds());
});
return task.ContinueWith(t => new LocationView(...));
}
public class LocationView
{
public string TruckId { get; set; }
public string Location { get; set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment