Last active
December 18, 2015 04:58
-
-
Save Maarten88/5728939 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Auction.Service.Contracts; | |
using Auction.Web.Domain; | |
using Auction.Web.Domain.Events; | |
using AutoMapper; | |
using Microsoft.AspNet.SignalR; | |
using Microsoft.AspNet.SignalR.Infrastructure; | |
namespace Auction.Web.Hubs.EventHandlers | |
{ | |
public class PriceUpdatedHandler : BaseEventHandler<PriceUpdatedEvent> | |
{ | |
public override void Handle(PriceUpdatedEvent ev) | |
{ | |
var priceUpdateMessage = Mapper.Map<ClientLotUpdate>(ev); | |
IConnectionManager connections = GlobalHost.DependencyResolver.GetService(typeof(IConnectionManager)) as IConnectionManager; | |
connections.GetHubContext<AuctionHub>().Clients.All.auctionUpdated(priceUpdateMessage); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment