public void Initialize(ApplicationStartupParameters appParameters) { try { if (_queue == null) { _queue = new MessageQueue(DoSend); } CompositionTarget.Rendering += CompositionTargetRendering; _sender = new ServerMessageSender(); _sender.ApplicationStarted += StartApplicationCompleted; _sender.ChannelFaulted += ChannelFaulted; _sender.MessageReceived += OnServerEventReceived; _sender.ChannelOpening += OnChannelOpening; _sender.ChannelOpened += OnChannelOpened; _sender.Intialize(); } catch (Exception ex) { var args = new ServerChannelFaultEventArgs { Error = ex }; ChannelFaulted(this, args); } }
public void Initialize(ApplicationStartupParameters appParameters) { try { if (_queue == null) _queue = new MessageQueue(DoSend); CompositionTarget.Rendering += CompositionTargetRendering; _sender = new ServerMessageSender(); _sender.ApplicationStarted += StartApplicationCompleted; _sender.ChannelFaulted += ChannelFaulted; _sender.MessageReceived += OnServerEventReceived; _sender.ChannelOpening += OnChannelOpening; _sender.ChannelOpened += OnChannelOpened; _sender.Intialize(); } catch (Exception ex) { var args = new ServerChannelFaultEventArgs { Error = ex }; ChannelFaulted(this,args); } }