You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support fluent configuration as well as attibutes #4
The fluent configuration needs to work with SubscriberRegistry and register the first item in the chain. In order to support fluent and attributes we might to parse all handlers in the chain for attributes and insert into the chain where there are attributes even if using fluent.
Do you have anything specific in mind in terms of features or style? I find writing attributes just to dictate order grating, especially as I perceive I've already configured my pipeline elsewhere.
Obviously RegisterAsync and Register would spawn specific config, with appropriate generic constraints to prevent mixing them up.
.Handler could also take Handler(typeof(XHandler));
The chain could be composing HandlersDescriptors under the hood so could be extended with extension methods. As suggested above it would probably make sense to create items in the config model to represent attributes too.
I think it'd be beneficial to include a Verify() member for the pipeline builder (or unit tests) internally to double check conflicts, particularly between registration config and attribute config?
I can only see what is useful for my own purposes so am happy to defer to something / someone more appropriate.
We've built something internally similar to this, I think it's good move to have a builder which can provide instantiations of the many interfaces Brighter requires for command professor and dispatcher.
I didn't have anything specific in mind. At the point I wrote this it was enough that it be compatible as an idea, as I was going with attributes and desired to leave implementation to someone who wanted fluent.
One internal request is default filters in the pipeline i.e. Give everything a logging step.
One way would be to add this to CP builder buyout would be nice to fold that request into this space.
@ianbattersby No worries. Am at a different gig now, may return to this if it becomes a problem again. Incidentally I found this again whilst googling for Brighter and structure map config.
Activity
edblackburn commentedon Apr 14, 2016
Do you have anything specific in mind in terms of features or style? I find writing attributes just to dictate order grating, especially as I perceive I've already configured my pipeline elsewhere.
Examples could be:
Which maintains backward compatibility. In addendum you could also have:
Obviously RegisterAsync and Register would spawn specific config, with appropriate generic constraints to prevent mixing them up.
.Handler could also take Handler(typeof(XHandler));
The chain could be composing
HandlersDescriptors under the hood so could be extended with extension methods. As suggested above it would probably make sense to create items in the config model to represent attributes too.I think it'd be beneficial to include a Verify() member for the pipeline builder (or unit tests) internally to double check conflicts, particularly between registration config and attribute config?
I can only see what is useful for my own purposes so am happy to defer to something / someone more appropriate.
Thoughts?
ianbattersby commentedon Apr 14, 2016
We've built something internally similar to this, I think it's good move to have a builder which can provide instantiations of the many interfaces Brighter requires for command professor and dispatcher.
iancooper commentedon Apr 14, 2016
I didn't have anything specific in mind. At the point I wrote this it was enough that it be compatible as an idea, as I was going with attributes and desired to leave implementation to someone who wanted fluent.
One internal request is default filters in the pipeline i.e. Give everything a logging step.
One way would be to add this to CP builder buyout would be nice to fold that request into this space.
edblackburn commentedon Apr 14, 2016
@ianbattersby Anything you can share? I don't fancy reinventing the wheel?
@iancooper I should be in London Tuesday afternoon if you or @ianbattersby are about we can discuss in person.
I have to complete some features first. As soon as that's done I can take a proper look (or not depending on what maybe already available).
ianbattersby commentedon May 13, 2016
@edblackburn Ed I'm really sorry, I completely forgot to reply!
Here you go with our simple 'make do' effort although our feeling is to get beyond this we'd need to make breaking changes to the existing fluency;
... and we use it like this;
edblackburn commentedon Jun 29, 2016
@ianbattersby No worries. Am at a different gig now, may return to this if it becomes a problem again. Incidentally I found this again whilst googling for Brighter and structure map config.
47 remaining items
docs: requirements rev 24 + ADR 0072 - the root-provider reference te…
docs: ADR 0075 + 0073 - the ordinary slice, round 7 (batch O-0075)
docs: ADR 0076 - the ordinary slice, round 7 (batch O-0076)
docs: ADR 0073 - the ordinary slice, round 7 (batch O-0073)
docs: requirements rev 25 + ADR 0074 - the ordinary slice, round 7 (b…
docs: ADRs 0070 + 0075 - the ordinary slice, round 7 (batch O-0070)
docs: ADR 0071 - the ordinary slice, round 7 (batch O-0071)
docs: ADR 0072 - the ordinary slice, round 7 (batch O-0072)
docs: all seven ADRs + index - the cross-ADR set-level residue, round…
docs: requirements rev 30 + ADR 0071 - the freestanding requirements …
docs: ADR 0074 - Phase 5 combined pass, structure and language (batch…
docs: ADR 0070 - Phase 5 combined pass, structure and language (batch…
docs: work the tasks review pass-3 findings (spec 0037)
docs: work the tasks review pass-4 findings (spec 0037)
test: sweeper and confirmation threads must not inherit ambient state