Example #1
0
        public PowerShellSynchronizationContext(
            IActionConsumer queue)
        {
            Requires.NotNull(queue, nameof(queue));

            this._queue = queue;
        }
Example #2
0
        public AriClient(
            IActionConsumer actionConsumer,
            IEventProducer eventProducer,
            string application,
            bool subscribeAllEvents = false,
            bool ssl = false)
        {
            _actionConsumer          = actionConsumer;
            _eventProducer           = eventProducer;
            EventDispatchingStrategy = DefaultEventDispatchingStrategy;

            // Setup Action Properties
            Asterisk     = new AsteriskActions(_actionConsumer);
            Applications = new ApplicationsActions(_actionConsumer);
            Bridges      = new BridgesActions(_actionConsumer);
            Channels     = new ChannelsActions(_actionConsumer);
            DeviceStates = new DeviceStatesActions(_actionConsumer);
            Endpoints    = new EndpointsActions(_actionConsumer);
            Events       = new EventsActions(_actionConsumer);
            Mailboxes    = new MailboxesActions(_actionConsumer);
            Playbacks    = new PlaybacksActions(_actionConsumer);
            Recordings   = new RecordingsActions(_actionConsumer);
            Sounds       = new SoundsActions(_actionConsumer);
            // Setup Event Handlers
            _eventProducer.OnMessageReceived        += _eventProducer_OnMessageReceived;
            _eventProducer.OnConnectionStateChanged += _eventProducer_OnConnectionStateChanged;

            _subscribeAllEvents = subscribeAllEvents;
            _ssl = ssl;
        }
Example #3
0
        private void BindCompatibleSections()
        {
            string selectedAction = String.Empty;

            if (ddlAction.SelectedIndex == -1 && ddlAction.Items.Count > 0)
            {
                selectedAction = ddlAction.Items[0].Value;
            }
            else
            {
                selectedAction = ddlAction.SelectedValue;
            }

            ArrayList compatibleModuleTypes = new ArrayList();
            // Get all ModuleTypes.
            IList moduleTypes = CoreRepository.GetAll(typeof(ModuleType));

            foreach (ModuleType mt in moduleTypes)
            {
                string assemblyQualifiedName = mt.ClassName + ", " + mt.AssemblyName;
                Type   moduleTypeType        = Type.GetType(assemblyQualifiedName);

                if (moduleTypeType != null) // throw exception when moduleTypeType == null?
                {
                    ModuleBase moduleInstance = base.ModuleLoader.GetModuleFromType(mt);
                    if (moduleInstance is IActionConsumer)
                    {
                        IActionConsumer actionConsumer = moduleInstance as IActionConsumer;
                        CMS.Core.Communication.Action currentAction = _activeActionProvider.GetOutboundActions().FindByName(selectedAction);
                        if (actionConsumer.GetInboundActions().Contains(currentAction))
                        {
                            compatibleModuleTypes.Add(mt);
                        }
                    }
                }
            }

            if (compatibleModuleTypes.Count > 0)
            {
                // Retrieve all sections that have the compatible ModuleTypes
                IList compatibleSections = CoreRepository.GetSectionsByModuleTypes(compatibleModuleTypes);
                if (compatibleSections.Count > 0)
                {
                    pnlTo.Visible               = true;
                    btnSave.Enabled             = true;
                    ddlSectionTo.DataSource     = compatibleSections;
                    ddlSectionTo.DataValueField = "Id";
                    ddlSectionTo.DataTextField  = "FullName";
                    ddlSectionTo.DataBind();
                }
                else
                {
                    pnlTo.Visible   = false;
                    btnSave.Enabled = false;
                }
            }
        }
Example #4
0
        public AriClient(IActionConsumer actionConsumer, IEventProducer eventProducer, string application)
        {
            _actionConsumer = actionConsumer;
            _eventProducer = eventProducer;
            EventDispatchingStrategy = DefaultEventDispatchingStrategy;

            // Setup Action Properties
            Asterisk = new AsteriskActions(_actionConsumer);
            Applications = new ApplicationsActions(_actionConsumer);
            Bridges = new BridgesActions(_actionConsumer);
            Channels = new ChannelsActions(_actionConsumer);
            DeviceStates = new DeviceStatesActions(_actionConsumer);
            Endpoints = new EndpointsActions(_actionConsumer);
            Events = new EventsActions(_actionConsumer);
            Mailboxes = new MailboxesActions(_actionConsumer);
            Playbacks = new PlaybacksActions(_actionConsumer);
            Recordings = new RecordingsActions(_actionConsumer);
            Sounds = new SoundsActions(_actionConsumer);
            

            // Setup Event Handlers
            _eventProducer.OnMessageReceived += _eventProducer_OnMessageReceived;
            _eventProducer.OnConnectionStateChanged += _eventProducer_OnConnectionStateChanged;
        }
		public ApplicationsActions(IActionConsumer consumer)
			: base(consumer)
		{}
Example #6
0
 public RecordingsActions(IActionConsumer consumer)
     : base(consumer)
 {
 }
		public DeviceStatesActions(IActionConsumer consumer)
			: base(consumer)
		{}
		public MailboxesActions(IActionConsumer consumer)
			: base(consumer)
		{}
Example #9
0
 public EventsActions(IActionConsumer consumer)
     : base(consumer)
 {
 }
Example #10
0
		public SoundsActions(IActionConsumer consumer)
			: base(consumer)
		{}
Example #11
0
		public EventsActions(IActionConsumer consumer)
			: base(consumer)
		{}
		public EndpointsActions(IActionConsumer consumer)
			: base(consumer)
		{}
 public AsteriskActions(IActionConsumer consumer)
     : base(consumer)
 {
 }
Example #14
0
 public ARIBaseAction(IActionConsumer consumer)
 {
     _consumer = consumer;
 }
		public AsteriskActions(IActionConsumer consumer)
			: base(consumer)
		{}
Example #16
0
		public RecordingsActions(IActionConsumer consumer)
			: base(consumer)
		{}
Example #17
0
		public BridgesActions(IActionConsumer consumer)
			: base(consumer)
		{}
Example #18
0
 public MailboxesActions(IActionConsumer consumer)
     : base(consumer)
 {
 }
Example #19
0
 public PlaybacksActions(IActionConsumer consumer)
     : base(consumer)
 {
 }
Example #20
0
		public PlaybacksActions(IActionConsumer consumer)
			: base(consumer)
		{}
Example #21
0
 public BridgesActions(IActionConsumer consumer)
     : base(consumer)
 {
 }
 public DeviceStatesActions(IActionConsumer consumer)
     : base(consumer)
 {
 }
Example #23
0
 public ApplicationsActions(IActionConsumer consumer)
     : base(consumer)
 {
 }
Example #24
0
 public EndpointsActions(IActionConsumer consumer)
     : base(consumer)
 {
 }
 public SoundsActions(IActionConsumer consumer)
     : base(consumer)
 { }
		public ChannelsActions(IActionConsumer consumer)
			: base(consumer)
		{}