private void PublishSessionMapElementHandler(SessionMapElement element, Uri subscriber) { try { using (SessionClientConnection callback = GetConnection(subscriber)) { //TraceFactory.Logger.Debug("PublishSessionMapElement({0}, {1})".FormatWith(element.Name, subscriber.AbsoluteUri)); callback.Channel.PublishSessionMapElement(element); //TraceFactory.Logger.Debug("PublishSessionMapElement({0}, {1})...DONE".FormatWith(element.Name, subscriber.AbsoluteUri)); } } catch (Exception ex) { TraceFactory.Logger.Debug("Error: {0}: {1}".FormatWith(subscriber.AbsoluteUri, ex.Message)); DropSubscriber(subscriber); } }
/// <summary> /// /// </summary> /// <param name="endpoint"></param> /// <returns></returns> protected SessionClientConnection GetConnection(Uri endpoint) { return(SessionClientConnection.Create(endpoint)); }