Ejemplo n.º 1
0
        public static void HandleEvent(Event @event)
        {
            IEventEmitter eventEmitter = DIExtensions.Container.GetInstance <IEventEmitter>();

            eventEmitter.EmitEvent(@event);

            PersistenceExtensions.OpenTransaction();
            DIExtensions.Container.GetInstance <EventDispatcher>().DispatchEvents();
            PersistenceExtensions.CommitTransaction();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a new sound module (corresponding to a new track) on the DAW
        /// </summary>
        /// <param name="client"></param>
        /// <param name="senderID"> The id to give the sound module</param>
        public void CreateSoundModule(string senderID)
        {
            Protocol.Module.CreateSoundModule createEvent = new Protocol.Module.CreateSoundModule
            {
                SenderId = senderID
            };

            Protocol.ModuleEvent moduleEvent = new Protocol.ModuleEvent
            {
                HandlerId = "app",
                CreateSoundModuleEvent = createEvent
            };

            Protocol.Event remoteEvent = new Protocol.Event
            {
                ModuleEvent = moduleEvent,
                MethodName  = "CreateSoundModule"
            };

            Emitter.EmitEvent(remoteEvent);
        }
Ejemplo n.º 3
0
 protected void EmitEvent(Event e)
 {
     _eventEmitter.EmitEvent(e);
 }