Exemplo n.º 1
0
        public void Run()
        {
            try
            {
                var pipeProxy = _pipeFactory.CreateChannel();
                if (pipeProxy == null || _pipeFactory.State != CommunicationState.Opened)
                {
                    Logger.Warn("Could not publish started message - connection closed.");
                    return;
                }

                var contract = new BusStartedContract
                {
                    Endpoint = Configure.EndpointName
                };
                Logger.Info("Published started message.");
                pipeProxy.BusStarted(contract);
            }
            catch (EndpointNotFoundException e)
            {
                Logger.Error("Unable to publish started message.", e);
            }
            catch (CommunicationObjectFaultedException e)
            {
                Logger.Error("Unable to publish started message.", e);
            }
        }
Exemplo n.º 2
0
 public void BusStarted(BusStartedContract message)
 {
     BusStartedEvent(this, message);
 }
        public void Start()
        {
            try
            {
                var pipeProxy = _pipeFactory.CreateChannel();
                if (pipeProxy == null || _pipeFactory.State != CommunicationState.Opened)
                {
                    Logger.Warn("Could not publish started message - connection closed.");
                    return;
                }

                var contract = new BusStartedContract
                {
                    Endpoint = Configure.EndpointName
                };
                Logger.Info("Published started message.");
                pipeProxy.BusStarted(contract);
            }
            catch (EndpointNotFoundException e)
            {
                Logger.Error("Unable to publish started message.", e);
            }
            catch (CommunicationObjectFaultedException e)
            {
                Logger.Error("Unable to publish started message.", e);
            }
        }
 public void BusStarted(BusStartedContract message)
 {
     BusStartedEvent(this, message);
 }