public bool Inspect <TMessage>(EndpointMessageSink <TMessage> sink) where TMessage : class { Append(string.Format("Send {0} to Endpoint {1}", GetMessageName <TMessage>(), sink.Endpoint.Address.Uri)); return(true); }
/// <summary> /// Connects an endpoint to the outbound pipeline by message type. /// </summary> /// <typeparam name="TMessage">The type of the message to route</typeparam> /// <param name="pipeline">The outbound pipeline</param> /// <param name="endpoint">The endpoint to route to</param> /// <returns></returns> public static UnsubscribeAction ConnectEndpoint <TMessage>(this IOutboundMessagePipeline pipeline, IEndpoint endpoint) where TMessage : class { var sink = new EndpointMessageSink <TMessage>(endpoint); return(pipeline.ConnectToRouter(sink)); }
public bool Inspect <TMessage>(EndpointMessageSink <TMessage> sink) where TMessage : class { if (typeof(TMessage) == _messageType) { DestinationAddress = sink.Endpoint.Address.Uri; return(false); } return(true); }
void CreateEndpointSink <TMessage>(IEndpoint endpoint) where TMessage : class { var endpointSink = new EndpointMessageSink <TMessage>(endpoint); var filterSink = new OutboundMessageFilter <TMessage>(endpointSink, context => context.DeclaringMessageType == typeof(TMessage)); UnsubscribeAction unsubscribeAction = _bus.OutboundPipeline.ConnectToRouter(filterSink); _added.Add(typeof(TMessage), unsubscribeAction); }
/// <summary> /// Called by the reflective visitor base. /// </summary> public bool Inspect <TMessage>(EndpointMessageSink <TMessage> sink) where TMessage : class { if (typeof(TMessage) == _messageType && _endpointAddress.Uri == sink.Endpoint.Address.Uri) { Found = true; return(false); } return(true); }
public bool Inspect <TMessage>(EndpointMessageSink <TMessage> sink) where TMessage : class { if (typeof(TMessage) == typeof(T)) { Result = Result.Concat(new[] { sink as IPipelineSink <T> }); return(false); } return(true); }
public bool Inspect <TMessage>(EndpointMessageSink <TMessage> sink) where TMessage : class { Append(string.Format("Send {0} to Endpoint {1}", typeof(TMessage).Name, sink.Address)); return(true); }