protected override void DoConfigure(IConfigSectionNode node) { base.DoConfigure(node); deleteChannels(); if (node == null || !node.Exists) { return; } m_Gateway.Configure(node[CONFIG_GATEWAY_SECTION]);//Configure gateway foreach (var cnode in node.Children.Where(cn => cn.IsSameName(CONFIG_CHANNEL_SECTION))) { var channel = FactoryUtils.MakeAndConfigure <Channel>(cnode, args: new object[] { this }); if (!m_Channels.Register(channel)) { throw new WebMessagingException(StringConsts.WM_SERVICE_NO_CHANNELS_ERROR.Args(GetType().Name)); } } }
void IRunnableHook.Prologue(Runner runner, FID id) { var config = CONFIG.AsLaconicConfig(handling: ConvertErrorHandling.Throw); m_App = new AzosApplication(null, config); m_Daemon = new MessageDaemon(m_App); m_Daemon.Configure(null); m_Daemon.Start(); m_Sink = m_Daemon.Sink as TwilioSink; Aver.IsNotNull(m_Sink); Aver.IsTrue(m_Sink.Name.EqualsOrdIgnoreCase("Twilio")); Aver.IsTrue(m_Sink.SupportedChannels == MsgChannels.SMS); Aver.IsTrue(m_Sink.SupportedChannelNames.Contains("Twilio")); Aver.IsTrue(m_Sink.Running); }