Ejemplo n.º 1
0
 public RoomEvents(
     IMassTransitEventingService massTransitEventingService,
     ILogger <RoomEvents> logger)
 {
     ParticipantJoined       = new MtEvent <ParticipantJoined>(massTransitEventingService, logger);
     ParticipantDisconnected = new MtEvent <ParticipantDisconnected>(massTransitEventingService, logger);
 }
        void IDistributedEventHandler.Raised(IDistributedEvent distributedEvent)
        {
            if (distributedEvent.Name != EventName)
            {
                return;
            }

            base.Trigger(distributedEvent.Context);
        }
Ejemplo n.º 3
0
        protected void RegisterFaultHandler <T>(
            IDistributedEvent <T> @event,
            Func <Fault <T>, Task> handler)
            where T : class
        {
            var disposeAction = @event.RegisterForErrors(handler);

            RegisterDisposable(disposeAction);
        }
        void IDistributedEventHandler.Raised(IDistributedEvent distributedEvent)
        {
            if (distributedEvent.Name != TenantRestartEventName) return;

            var shellSettings = !string.IsNullOrEmpty(distributedEvent.Context) ? ShellSettingsSerializer.ParseSettings(distributedEvent.Context) : _shellSettings;

            shellSettings["IsShellRestart"] = "True";
            _shellSettingsEvents.Saved(shellSettings);
        }
        void IDistributedEventHandler.Raised(IDistributedEvent distributedEvent)
        {
            if (distributedEvent.Name != TenantRestartEventName)
            {
                return;
            }

            var shellSettings = !string.IsNullOrEmpty(distributedEvent.Context) ? ShellSettingsSerializer.ParseSettings(distributedEvent.Context) : _shellSettings;

            shellSettings["IsShellRestart"] = "True";
            _shellSettingsEvents.Saved(shellSettings);
        }
 void IDistributedEventHandler.Triggered(IDistributedEvent distributedEvent)
 {
 }
Ejemplo n.º 7
0
 protected void RegisterFaultHandler <T>(
     IDistributedEvent <T> @event,
     Action <Fault <T> > handler)
     where T : class
 => RegisterFaultHandler(@event, handler.MakeTaskCompatible() !);
 void IDistributedEventHandler.Triggered(IDistributedEvent distributedEvent)
 {
 }