public FormSubscribePublishChannelConfig(ConfigurationInitializationParameter param, SubscribePublishChannelConfig config) { InitializeComponent(); _param = param; _config = config; if (_config == null) { _config = new SubscribePublishChannelConfig(); } }
public bool Initialize(ChannelInitializationParameter parameter) { if (parameter == null) { return(false); } _param = parameter; _config = XObjectManager.CreateObject <SubscribePublishChannelConfig>(parameter.ConfigXmlString); if (_config == null) { WriteLog(LogType.Error, "Deserialize configuration object failed."); return(false); } _pipeLine = new ProcessingPipeLine(_config.Processors, _param); return(_pipeLine.Initialize()); }
public bool EditConfig(Form parentForm, ref string configXmlString) { SubscribePublishChannelConfig cfg = XObjectManager.CreateObject <SubscribePublishChannelConfig>(configXmlString); if (cfg == null) { WriteLog(LogType.Error, "Deserialize configuration object failed."); return(false); } else { FormSubscribePublishChannelConfig frm = new FormSubscribePublishChannelConfig(_param, cfg); if (frm.ShowDialog(parentForm) != DialogResult.OK) { return(false); } configXmlString = frm.Config.ToXMLString(); return(true); } }