public void UpdateParameterVariables(IListenerInfo listener) { String routerName = listener.Params["name"].Trim(); if (string.IsNullOrWhiteSpace(routerName)) { throw new ReflectInsightException(String.Format("Missing name parameter for listener: '{0}' using details: '{1}'.", listener.Name, listener.Details)); } NameValueCollection routerParameters = ReflectInsightConfig.Settings.GetSubsection(String.Format("routers.{0}", routerName)); if (routerParameters == null) { throw new ReflectInsightException(String.Format("Missing router section '{0}' for listener: '{1}' using details: '{2}'.", routerName, listener.Name, listener.Details)); } if (string.IsNullOrWhiteSpace(routerParameters["type"])) { throw new ReflectInsightException(String.Format("Missing type parameter for router: '{0}'. Insure that the router is correctly configured.", routerName)); } ListenerRequest.DestinationBinding = 0; if (!string.IsNullOrWhiteSpace(listener.Params["destinationBindingGroup"])) { ListenerRequest.DestinationBinding = DestinationBindingGroup.GetId(listener.Params["destinationBindingGroup"]); } MessageWriter = ReadWriterFactory.CreateInstance <IMessageWriter>(routerParameters); if (MessageWriter is IThreadExceptionEvent) { (MessageWriter as IThreadExceptionEvent).OnThreadException += OnWriterThreadException; } }
public void SetDestinationBindingGroup(String destinationBindingGroup) { lock (this) { DestinationBindingGroupName = destinationBindingGroup; if (!string.IsNullOrWhiteSpace(destinationBindingGroup)) { DestinationBindingGroupId = DestinationBindingGroup.GetId(destinationBindingGroup); } } }
public DestinationBindingGroup GetDestinationBindingGroup(String bindingGroupName) { return(GetDestinationBindingGroup(DestinationBindingGroup.GetId(bindingGroupName))); }