Simplify the handle ordering API#2280
Conversation
|
@andreasohlund @indualagarsamy @SimonCropp thumbs up or down ? |
|
Since users might have ISpecifyMessageHandlerOrdering in separate dll's what would be the replacement? Creating a INeedInitialization and call builder.InvokeTheseHandlersFirst from there? |
|
U actually raise a good point, currently if the user has multiple On Wednesday, August 6, 2014, Andreas Öhlund notifications@github.com
|
|
Yes an INeedInitialization would work. On Wednesday, August 6, 2014, Andreas Öhlund notifications@github.com
|
|
They add up, and we throw if they are conflicting I think On Wed, Aug 6, 2014 at 2:01 PM, John Simons notifications@github.com
|
|
@SimonCropp you always have good argument in favour of removing code, can you chip in on these and lets make a decision. |
|
ok so while So a big +1 from me |
|
I'm +1 for doing it. But with all the other stuff we have going on can it wait to V6? Sent from my iPhone
|
|
yep On 8 August 2014 15:49, Andreas Öhlund notifications@github.com wrote:
|
|
cc @DavidBoike |
Deprecated ISpecifyMessageHandlerOrdering and buddies Closes #2280
d42aac7 to
33603d2
Compare
Deprecated ISpecifyMessageHandlerOrdering and buddies Closes #2280
33603d2 to
c438e7a
Compare
Deprecated ISpecifyMessageHandlerOrdering and buddies Closes #2280
c438e7a to
575a28d
Compare
Deprecated ISpecifyMessageHandlerOrdering and buddies Closes #2280
|
@Particular/nservicebus this one is ready to be reviewed. |
|
@johnsimons How can we proceed with this? I think the method names are good. |
|
@danielmarbach a bit busy with the SC retries, but all is left is merge and doco |
Deprecated ISpecifyMessageHandlerOrdering and buddies Closes #2280
|
@johnsimons Decided to get rid of the The compiler chooses the params overload and then Resharper says your definition is redundant. picks also the params overload When you want to pass in an One less public API is good. |
575a28d to
14805c7
Compare
|
@johnsimons hold your breath. I did a rebase. |
|
@johnsimons I did the doco. Please chime in for the review here Particular/docs.particular.net#707 If everything is good please go ahead and merge both |
|
Disagree. If u only do one method u shoud do the ienumerable one. |
|
@SimonCropp provide more context please. If not your reasoning cannot be understood. |
|
@danielmarbach the standard approach for taking in multiple items in an api is IEnumerable. i dont see a reason to deviate from that. as for
While i agree with that in principle i dont think it applies in this case. i cant think of a scenario where we would change this api in a way that would cause extra pain to the consumer because we are taking the standard approach of "param and a enumerable overload". Effectively, in this case, it is one api with two manifestations for convenience. So i think leave it with a params and enumerable |
|
Yeah but did you read my comment how it looks from the usage perspective? I don't feel strong about it. You have more experience with those sort of APIs than I have. I just felt weird when coding against the API. Based on that hunch I removed the enumerable overload. |
|
@danielmarbach i am confused the regular use of this api is to pass in a small number of types known at compile time. so the usage would not be but |
|
Ergo we don't need the enumerable overload ;) |
|
there is not tax in this extra api #2280 (comment) and there is some benefit. ie no need for a toarray. ergo we should have both |
|
@danielmarbach the only reason I added the IEnumerable<Type> handlersToExecuteFirst = GetListOfHandlers();
c.ExecuteTheseHandlersFirst(handlersToExecuteFirst);This way there is no need to allocate an extra array. Does this make sense ? Also in your example, R# is just suggesting an optimisation based on static code analysis, and yes in that specific case it makes sense to do what R# suggests, but in the example above there is no optimisation. |
This reverts commit 14805c7.
|
@johnsimons @SimonCropp reverted back to have both APIs. |
…dlerOrdering Simplify the handle ordering API

Problem description
At the moment we have a very IMO unintuitive API to specify message ordering.
ISpecifyMessageHandlerOrdering, egconfig.LoadMessageHandlersoverloads, eg:Proposal
New API