コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: Endpoint.cs プロジェクト: ibebbs/Harmonize
        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));
        }