public void Register(string connectionId, Common.Dto.Identity registrar, Common.Dto.Entity entity, Action <string, Common.Dto.Identity, Common.Dto.Identity, Common.Dto.Message> process) { Registration.IInstance registration = _registrationFactory.For(connectionId, registrar, entity, process); _registrations.Add(registration); _messagingEndpoint.Register(registration.Registrar, registration.Entity, registration.Consumer); }
public async Task Register(With.Component.IIdentity client, With.Component.IEntity entity, IObserver <Message.IMessage> consumer) { Registration.IInstance registration = _registrationFactory.For(client, entity, consumer); _registrations.Add(registration); await _hub.Register(registration.Client, registration.Entity); System.Diagnostics.Debug.WriteLine(string.Format("Client Registered '{0}'", registration.Key)); }