public EventCookie(RecivedDomainEvent domainEvent, IConnectionManager connectionManager) { _connectionManager = connectionManager; DomainEvent = domainEvent; _waitLock = new CountdownEvent(connectionManager.GetCurrentClients(domainEvent.RealMessage.EventName)); connectionManager.ClientAdded += ConnectionManagerOnClientAdded; connectionManager.ClientRemoved += ConnectionManagerOnClientRemoved; }
private static RecivedDomainEvent CreateEventFailedEvent(RecivedDomainEvent original) { return(new RecivedDomainEvent(new ServerDomainMessage { EventData = JsonConvert.SerializeObject(new EventFailedEventMessage { EventName = original.RealMessage.EventName }), EventName = HubEventNames.DispatcherEvent.DeliveryFailedEvent, TypeName = typeof(EventFailedEventMessage).AssemblyQualifiedName, EventType = EventType.Event, SequenceNumber = -1 }, string.Empty)); }