ramonesteban78 / rockmvvmforms Goto Github PK
View Code? Open in Web Editor NEWInitial version of RockMvvmForms framework
License: MIT License
Initial version of RockMvvmForms framework
License: MIT License
We need to prepare a plugin or just add an IoC like Autofac.
This is because the DependencyService of Forms is not testable from a nUnit Library project as it needs to Init Forms to make use of it.
These could cause the following additional implementations:
I will prepare this feature asap.
We need an Init() function to avoid access to IViewFactory interface in the App.cs
Also the registration of Views and ViewModels should be made maybe through a RockMvvmForms.Register or something like that.
Say Rock if you would like to have this improve :)
What about adding a method like this without actually creating the instance right away. It would be on hold until requested with Get<T>
and it would improve performance in the case we register lot of things.
It could be something like:
Register<T>(Func<T> createAction) { }
RockServiceLocator.Current.Register<Ball>(() => new Ball());
That would also allow us to use concrete instances:
var ball = new Ball(param1, param2);
RockServiceLocator.Current.Register<Ball>(() => ball);
But that would affect how your locator works, because right now everything you register is interpreted as a Singleton. So, to handle this situation I would implement an API like the following:
Register<T, TImpl>(); // a new instance will be created with every Get<T>();
Register<T>(Func<T> instanceFunc); // instanceFunc will be invoked with every Get<T>();
RegisterSingleton<T, TImpl>(); // same as your current Register<T, Timpl>();
RegisterLazySingleton<T>(Func<T> instanceFunc); // instanceFunc will be invoked just once and the result is saved for later use
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.