Particular/NServiceBus — pull request #2110 by johnsimons (2014-05-16 06:18:43+00:00)
Title: Pipeline new registration API

I've completely redesigned the registration API.
Still fixing little things but here is a sample of what it looks like:

```c#
class OutboxDeduplicationRegistration: RegisterBehavior{
public OutboxDeduplicationRegistration()
: base("OutboxDeduplication", typeof(OutboxDeduplicationBehavior), "Deduplication for the outbox feature")
{
InsertAfter(WellKnownBehavior.ChildContainer);
InsertBefore(WellKnownBehavior.UnitOfWork);
}
}

class OutboxRecorderRegistration : RegisterBehavior
{
public OutboxRecorderRegistration()
: base("OutboxRecorder", typeof(OutboxRecordBehavior), "Records all action to the outbox storage")
{
InsertBefore(WellKnownBehavior.IncomingTransportMessageMutators);
InsertAfter(WellKnownBehavior.UnitOfWork);
}
}
```

And these need to be explicit registrations, eg:
```c#
public class PipelineConfig : INeedInitializatiob
{
public void Init()
{
Configure.Pipeline.Register();
Configure.Pipeline.Register();
Configure.Pipeline.Replace(WellKnownBehavior.DispatchMessageToTransport, typeof(OutboxSendBehavior), "Sending behavior with a delay sending until all business transactions are committed to the outbox storage");
}
}
```

or from the bootstrapper:
```c#
class EndpointConfig : IConfigureThisEndpoint, AsA_Publisher, IWantCustomInitialization
{
public void Init()
{
Configure.Pipeline.Register();
Configure.Pipeline.Replace(WellKnownBehavior.DispatchMessageToTransport, typeof(OutboxSendBehavior), "Sending behavior with a delay sending until all business transactions are committed to the outbox storage");
Configure.With()
.DefaultBuilder()
...
}
}
```

Thoughts so far?