欢迎来到天天文库
浏览记录
ID:34237904
大小:432.52 KB
页数:26页
时间:2019-03-04
《prism4.0trainingkithands-onlabusingmefasthedependencyinjectioncontainer》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、PRISM4.0TRAININGKITHands-OnLabUsingMEFastheDependencyInjectionContainerLabversion:1.0.0Lastupdated:9/19/2021ContentsOVERVIEW3EXERCISE1-LOADINGMODULESUSINGMEFCATALOGS4Task1–CreatingtheApplicationBootstrapper4Task2–LoadingModuleswithTypeCatalogs5Task3–AddingaRegiontothe
2、Shell6Task4–ShowingaviewintheShell7EXERCISE2-REGISTERINGVIEWSUSINGTHEVIEWEXPORTATTRIBUTE9Task1–Creatingaviewinsidetheshellproject9Task2–DecoratingaviewwiththeViewExportAttribute10EXERCISE3-USINGREMOTEMODULELOADING12Task1–CreatingthenewModuleB13Task2–CreatingaXAMLModul
3、eCatalogandUpdatingBootStrappertoRemotelyLoadModuleB15EXERCISE4-MONITORINGDOWNLOADPROGRESSOFMODULES18Task1–ConfiguringaModuletobeLoadedonDemand18Task2–AddingaDownloadProgressIndicator19OverviewThePrismLibraryprovidestwooptionsfordependencyinjectioncontainers:UnityorME
4、F.Prismisextensible,therebyallowingothercontainerstobeusedinsteadwithalittlebitofwork.BothUnityandMEFprovidethesamebasicfunctionalityfordependencyinjection,eventhoughtheyworkverydifferently.Someofthecapabilitiesprovidedbybothcontainersincludethefollowing:·Theybothregi
5、stertypeswiththecontainer.·Theybothregisterinstanceswiththecontainer.·Theybothimperativelycreateinstancesofregisteredtypes.·Theybothinjectinstancesofregisteredtypesintoconstructors.·Theybothinjectinstancesofregisteredtypesintoproperties.·Theybothhavedeclarativeattribu
6、tesformarkingtypesanddependenciesthatneedtobemanaged.·Theybothresolvedependenciesinanobjectgraph.MEFprovidesseveralcapabilitiesthatUnitydoesnot:·Itdiscoversassembliesinadirectory.·ItusesXAPfiledownloadandassemblydiscovery.·Itrecomposespropertiesandcollectionsasnewtype
7、sarediscovered.·Itautomaticallyexportsderivedtypes.·Itisdeployedwiththe.NETFramework.Exercise1-LoadingModulesUsingMEFCatalogsTask1–CreatingtheApplicationBootstrapperInthistask,youwillcreateabootstrapperforyourPrismapplication.Overthefollowingtasks,youwilladdfunctional
8、itytothisbootstrapperclass.1.OpentheMEFCodeModuleLoadingBegin.slnsolutionlocatedundertheMEFExercise1Begindirectoryofthis
此文档下载收益归作者所有
点击更多查看相关文章~~