ninject / ninject.extensions.weakeventmessagebroker Goto Github PK
View Code? Open in Web Editor NEWMessage broker extension for Ninject using weak events
License: Other
Message broker extension for Ninject using weak events
License: Other
When annotating methods on classes that extend Control or DispatcherObject it would be really nice if there was a way to mark the methods as requiring Invoke to be called. At present one has to add boiler plate to each subscription to check InvokeRequire and then Invoke if appropriate.
E.g. [Subscribe("message://UpdateAvailable", Invoke=true)]
The broker could check the MethodInfo's declaring class and if extends Control or DispatcherObject it could delegate to the Invoke call. It might even be nice to have a second property "ASync" which would call the events using BeginInvoke.
On this theme a flag to specify that the event should be run on the ThreadPool could also be useful.
Is this feasible?
At present if you try to subscribe to a MessageChannel with the incorrect method signature you'll receive an InvalidProgramException: JIT Compiler encountered an internal limitation.
The MessageChannel could check when an event/method is registered that the method matches the form required. e.g. void EventHandler(object sender, EventArgs args).
A further extension to this would be to record the first method/event signature registered for a channel and to check all subsequent registrations match the first and throw a descriptive ActivationException if not.
N.B when compiled with NO_LCG the reflection based transport will throw a more informative exception about the method signatures having different numbers of parameters.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.