xamarin - DryIoC - Register equivalent in Unity Prism -


what equivalent of code(dryioc) in unity?

container.register<iauthenticationservice, authenticationservice>( reuse.singleton ); 

this sample code hamburgermenu project in prism xamarin

thanks!

container.registertype<iauthenticationservice, authenticationservice>( new containercontrolledlifetimemanager() ); 

that means lifetime of authenticationservice match lifetime of container. if don't destroy , recreate container, you'll same service instance.


Comments

Popular posts from this blog

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -