public PowerShellSynchronizationContext( IActionConsumer queue) { Requires.NotNull(queue, nameof(queue)); this._queue = queue; }
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; }
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; } } }
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) {}
public RecordingsActions(IActionConsumer consumer) : base(consumer) { }
public DeviceStatesActions(IActionConsumer consumer) : base(consumer) {}
public MailboxesActions(IActionConsumer consumer) : base(consumer) {}
public EventsActions(IActionConsumer consumer) : base(consumer) { }
public SoundsActions(IActionConsumer consumer) : base(consumer) {}
public EventsActions(IActionConsumer consumer) : base(consumer) {}
public EndpointsActions(IActionConsumer consumer) : base(consumer) {}
public AsteriskActions(IActionConsumer consumer) : base(consumer) { }
public ARIBaseAction(IActionConsumer consumer) { _consumer = consumer; }
public AsteriskActions(IActionConsumer consumer) : base(consumer) {}
public RecordingsActions(IActionConsumer consumer) : base(consumer) {}
public BridgesActions(IActionConsumer consumer) : base(consumer) {}
public MailboxesActions(IActionConsumer consumer) : base(consumer) { }
public PlaybacksActions(IActionConsumer consumer) : base(consumer) { }
public PlaybacksActions(IActionConsumer consumer) : base(consumer) {}
public BridgesActions(IActionConsumer consumer) : base(consumer) { }
public DeviceStatesActions(IActionConsumer consumer) : base(consumer) { }
public ApplicationsActions(IActionConsumer consumer) : base(consumer) { }
public EndpointsActions(IActionConsumer consumer) : base(consumer) { }
public SoundsActions(IActionConsumer consumer) : base(consumer) { }
public ChannelsActions(IActionConsumer consumer) : base(consumer) {}