ÓÑÇéÌáʾ£ºÈç¹û±¾ÍøÒ³´ò¿ªÌ«Âý»òÏÔʾ²»ÍêÕû£¬Çë³¢ÊÔÊó±êÓÒ¼ü¡°Ë¢Ð¡±±¾ÍøÒ³£¡
¸»Ê¿¿µÐ¡ËµÍø ·µ»Ø±¾ÊéĿ¼ ¼ÓÈëÊéÇ© ÎÒµÄÊé¼Ü ÎÒµÄÊéÇ© TXTÈ«±¾ÏÂÔØ ¡ºÊղص½ÎÒµÄä¯ÀÀÆ÷¡»

VB2008´ÓÈëÃŵ½¾«Í¨(PDF¸ñʽӢÎÄ°æ)-µÚ60²¿·Ö

¿ì½Ý²Ù×÷: °´¼üÅÌÉÏ·½Ïò¼ü ¡û »ò ¡ú ¿É¿ìËÙÉÏÏ·­Ò³ °´¼üÅÌÉ쵀 Enter ¼ü¿É»Øµ½±¾ÊéĿ¼ҳ °´¼üÅÌÉÏ·½Ïò¼ü ¡ü ¿É»Øµ½±¾Ò³¶¥²¿! Èç¹û±¾ÊéûÓÐÔĶÁÍ꣬ÏëÏ´μÌÐø½Ó×ÅÔĶÁ£¬¿ÉʹÓÃÉÏ·½ "Êղص½ÎÒµÄä¯ÀÀÆ÷" ¹¦ÄÜ ºÍ "¼ÓÈëÊéÇ©" ¹¦ÄÜ£¡



about¡¡the¡¡state¡£¡¡Thus£»¡¡when¡¡a¡¡lambda¡¡expression¡¡is¡¡created£»¡¡the¡¡state¡¡at¡¡the¡¡time¡¡of¡¡the¡¡lambda¡¡expression¡¡¡¡

may¡¡not¡¡be¡¡the¡¡same¡¡as¡¡when¡¡the¡¡lambda¡¡expression¡¡is¡¡executed¡£¡¡If¡¡you¡¡are¡¡not¡¡acutely¡¡aware¡¡of¡¡this¡¡potential¡¡¡¡

pitfall£»¡¡you¡¡could¡¡have¡¡some¡¡major¡¡bugs¡¡in¡¡your¡¡code¡£¡¡¡¡



The¡¡Important¡¡Stuff¡¡to¡¡Remember¡¡



In¡¡this¡¡chapter£»¡¡you¡¡learned¡¡how¡¡to¡¡use¡¡¡¡generics¡¡and¡¡also¡¡expanded¡¡your¡¡knowledge¡¡of¡¡¡¡

lambda¡¡expressions¡£¡¡The¡¡main¡¡items¡¡to¡¡remember¡¡are¡¡as¡¡follows£º¡¡



¡¡¡¡¡¡¡¡¡¡o¡¡¡¡¡¡generics¡¡code¡¡can¡¡use¡¡¡¡generics£»¡¡or¡¡it¡¡can¡¡be¡¡code¡¡that¡¡provides¡¡types¡¡based¡¡on¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡generics¡£¡¡



¡¡¡¡¡¡¡¡¡¡o¡¡¡¡Performance¡¡and¡¡type¡­safe¡¡characteristics¡¡are¡¡primary¡¡reasons¡¡for¡¡using¡¡¡¡generics¡£¡¡



¡¡¡¡¡¡¡¡¡¡o¡¡¡¡You¡¡can¡¡use¡¡¡¡generics¡¡at¡¡the¡¡type¡¡level¡¡or¡¡at¡¡the¡¡method¡¡level¡£¡¡Using¡¡¡¡generics¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡at¡¡the¡¡type¡¡level¡¡implies¡¡concretizing¡¡the¡¡type¡¡when¡¡the¡¡type¡¡is¡¡instantiated¡£¡¡Using¡¡¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡generics¡¡at¡¡the¡¡method¡¡level¡¡implies¡¡concretizing¡¡the¡¡type¡¡when¡¡the¡¡method¡¡is¡¡called¡£¡¡



¡¡¡¡¡¡¡¡¡¡o¡¡¡¡Lambda¡¡expressions¡¡may¡¡be¡¡shared¡¡state¡¡or¡¡individual¡¡state£»¡¡depending¡¡on¡¡how¡¡they¡¡are¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡declared¡¡and¡¡manipulated¡£¡¡


¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­Page¡¡334¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­

312¡¡¡¡¡¡¡¡¡¡¡¡¡¡CH¡¡AP¡¡T¡¡E¡¡R¡¡¡¡¡¡1¡¡1¡¡¡¡¡¡¡ö¡¡¡¡¡¡¡¡L¡¡E¡¡A¡¡R¡¡N¡¡I¡¡N¡¡G¡¡¡¡¡¡A¡¡B¡¡OU¡¡T¡¡¡¡¡¡¡£¡¡N¡¡E¡¡T¡¡¡¡G¡¡E¡¡N¡¡E¡¡R¡¡I¡¡CS¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡o¡¡¡¡For¡¡plex¡¡types£»¡¡you¡¡should¡¡always¡¡implement¡¡ToString£¨£©¡¡as¡¡a¡¡way¡¡of¡¡figuring¡¡out¡¡the¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡state¡¡of¡¡an¡¡instance¡£¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡o¡¡¡¡Lambda¡¡expressions¡¡act¡¡asynchronously¡£¡¡When¡¡you¡¡use¡¡them£»¡¡remember¡¡to¡¡not¡¡make¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡assumptions¡¡of¡¡a¡¡particular¡¡state¡£¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Some¡¡Things¡¡for¡¡You¡¡to¡¡Do¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡The¡¡following¡¡are¡¡some¡¡exercises¡¡that¡¡allow¡¡you¡¡to¡¡apply¡¡what¡¡you¡¯ve¡¡learned¡¡so¡¡far¡£¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡1¡£¡¡The¡¡Worksheet£¨Of¡¡BaseType£©¡¡class¡¡always¡¡requires¡¡you¡¡to¡¡dimension¡¡the¡¡fixed¡­cell¡¡array¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ahead¡¡of¡¡time¡£¡¡Change¡¡this¡¡code¡¡so¡¡that¡¡the¡¡number¡¡of¡¡rows¡¡and¡¡columns¡¡can¡¡change¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡dynamically¡£¡¡Remember¡¡that¡¡the¡¡focus¡¡is¡¡on¡¡performance£»¡¡and¡¡the¡¡fastest¡¡approach¡¡is¡¡a¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡fixed¡­dimension¡¡array¡£¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2¡£¡¡The¡¡average¡¡calculation¡¡knows¡¡how¡¡many¡¡items¡¡there¡¡are¡¡by¡¡the¡¡row¡¡number¡£¡¡Rewrite¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡the¡¡average¡¡calculation¡¡code¡¡so¡¡that¡¡the¡¡user¡¡of¡¡the¡¡average¡¡code¡¡does¡¡not¡¡need¡¡to¡¡deal¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡with¡¡the¡¡plexities¡¡of¡¡adding¡¡more¡¡elements£»¡¡moving¡¡the¡¡cell¡¡calculation£»¡¡and¡¡so¡¡on¡£¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡3¡£¡¡The¡¡methods¡¡Calculate£¨£©¡¡and¡¡GetCellState£¨£©¡¡seem¡¡to¡¡do¡¡the¡¡same¡¡thing¡£¡¡So£»¡¡is¡¡there¡¡a¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡need¡¡to¡¡have¡¡separate¡¡methods£¿¡¡Answer¡¡the¡¡question£»¡¡and¡¡then¡¡make¡¡any¡¡necessary¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡changes¡¡to¡¡the¡¡source¡¡code¡¡based¡¡on¡¡your¡¡answer¡£¡¡


¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­Page¡¡335¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­

C¡¡¡¡H¡¡¡¡A¡¡¡¡P¡¡¡¡T¡¡¡¡E¡¡¡¡R¡¡¡¡¡¡¡¡¡¡1¡¡¡¡2¡¡



¡ö¡¡¡ö¡¡¡ö¡¡



Learning¡¡About¡¡¡¡

Application¡¡Configuration¡¡¡¡

and¡¡Dynamic¡¡Loading¡¡



All¡¡of¡¡the¡¡examples¡¡in¡¡the¡¡preceding¡¡chapters¡¡have¡¡demonstrated¡¡how¡¡to¡¡use¡¡an¡¡application¡¡¡¡

with¡¡a¡¡specific¡¡ponent¡£¡¡You¡¡knew¡¡which¡¡type¡¡to¡¡instantiate£»¡¡which¡¡interface¡¡to¡¡use£»¡¡and¡¡¡¡

which¡¡project¡¡to¡¡reference¡£¡¡In¡¡these¡¡cases£»¡¡you£»¡¡as¡¡the¡¡developer£»¡¡are¡¡in¡¡plete¡¡control£»¡¡and¡¡¡¡

when¡¡your¡¡application¡¡is¡¡built£»¡¡all¡¡of¡¡the¡¡assemblies¡¡pop¡¡out¡¡as¡¡a¡¡nice£»¡¡neat¡¡package¡£¡¡

¡¡¡¡¡¡¡¡¡¡But¡¡what¡¡works¡¡for¡¡the¡¡developer¡¡might¡¡not¡¡necessarily¡¡work¡¡for¡¡others¡£¡¡Let¡¯s¡¡go¡¡back¡¡to¡¡¡¡

the¡¡lighting¡¡system¡¡presented¡¡in¡¡Chapter¡¡8¡£¡¡We¡¡created¡¡a¡¡kernel¡¡that¡¡was¡¡responsible¡¡for¡¡turning¡¡¡¡

on¡¡and¡¡off¡¡the¡¡lights¡£¡¡The¡¡implementations¡¡of¡¡the¡¡individual¡¡rooms¡¡were¡¡in¡¡a¡¡predetermined¡¡¡¡

project¡¡with¡¡a¡¡specific¡¡name¡£¡¡This¡¡architecture¡¡would¡¡not¡¡work¡¡with¡¡a¡¡third¡­party¡¡library£»¡¡because¡¡¡¡

the¡¡kernel¡¡expected¡¡a¡¡project¡¡of¡¡a¡¡certain¡¡name¡£¡¡You¡¡might¡¡be¡¡thinking£»¡¡¡°Heck£»¡¡that¡¯s¡¡easy¡¡to¡¡¡¡

solve¡ªI¡¡just¡¡delete¡¡the¡¡old¡¡project¡¡and¡¡rename¡¡my¡¡project¡¡to¡¡match¡¡the¡¡old¡¡name¡£¡±¡¡That¡¡tech

nique¡¡would¡¡work£»¡¡but¡¡it¡¡would¡¡also¡¡be¡¡an¡¡administrator¡¯s¡¡nightmare¡£¡¡The¡¡solution¡¡is¡¡to¡¡tell¡¡the¡¡¡¡

program£»¡¡¡°For¡¡lighting¡¡room¡¡implementations£»¡¡look¡¡at¡¡this¡¡project¡¡and¡¡these¡¡types¡£¡±¡¡And¡¡to¡¡¡¡

give¡¡the¡¡program¡¡this¡¡information£»¡¡you¡¡define¡¡some¡¡text¡¡in¡¡a¡¡file¡£¡¡A¡¡file¡¡that¡¡tells¡¡a¡¡program¡¡to¡¡do¡¡¡¡

some¡¡task¡¡is¡¡called¡¡a¡¡runtime¡¡configuration¡¡file¡£¡¡

¡¡¡¡¡¡¡¡¡¡This¡¡chapter¡¡focuses¡¡on¡¡two¡¡areas£º¡¡using¡¡application¡¡configuration¡¡files¡¡and¡¡dynamically¡¡¡¡

loading¡¡code¡£¡¡A¡¡related¡¡topic¡¡is¡¡how¡¡much¡¡dynamically¡¡executed¡¡code¡¡should¡¡be¡¡configuration¡¡¡¡

and¡¡how¡¡much¡¡should¡¡be¡¡convention¡£¡¡¡¡



Convention¡¡over¡¡Configuration¡¡



The¡¡question¡¡of¡¡how¡¡to¡¡reference¡¡and¡¡instantiate¡¡classes¡¡is¡¡both¡¡philosophical¡¡and¡¡pragmatic¡£¡¡¡¡

Consider¡¡the¡¡architecture¡¡shown¡¡in¡¡Figure¡¡12¡­1£»¡¡which¡¡is¡¡a¡¡modular¡¡interface¡¡and¡¡implementation¡¡¡¡

that¡¡was¡¡presented¡¡as¡¡an¡¡alternative¡¡architecture¡¡for¡¡the¡¡lighting¡¡system¡¡example¡¡in¡¡Chapter¡¡8¡£¡¡¡¡

In¡¡this¡¡figure£»¡¡each¡¡of¡¡the¡¡boxes¡¡represents¡¡a¡¡single¡¡project£º¡¡a¡¡project¡¡that¡¡contains¡¡the¡¡interface¡¡¡¡

definitions£»¡¡a¡¡project¡¡that¡¡contains¡¡the¡¡implementations£»¡¡and¡¡a¡¡project¡¡that¡¡contains¡¡the¡¡kernel¡£¡¡¡¡

The¡¡idea¡¡of¡¡all¡¡of¡¡these¡¡projects¡¡is¡¡to¡¡make¡¡it¡¡possible¡¡to¡¡update¡¡a¡¡single¡¡project¡¡without¡¡needing¡¡¡¡

to¡¡update¡¡all¡¡of¡¡them¡£¡¡However£»¡¡what¡¡is¡¡not¡¡indicated¡¡in¡¡the¡¡picture¡¡is¡¡the¡¡fact¡¡that¡¡your¡¡appli

cation¡¡must¡¡be¡¡able¡¡to¡¡reference¡¡all¡¡three¡¡projects¡£¡¡If¡¡one¡¡of¡¡those¡¡projects¡¡is¡¡missing£»¡¡you¡¡have¡¡¡¡

a¡¡problem£»¡¡because¡¡your¡¡program¡¡cannot¡¡function¡£¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡313¡¡


¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­Page¡¡336¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­

314¡¡¡¡¡¡¡¡¡¡¡¡¡¡CH¡¡AP¡¡T¡¡E¡¡R¡¡¡¡¡¡1¡¡2¡¡¡¡¡¡¡ö¡¡¡¡¡¡¡¡L¡¡E¡¡A¡¡R¡¡N¡¡I¡¡N¡¡G¡¡¡¡¡¡A¡¡B¡¡OU¡¡T¡¡¡¡¡¡A¡¡PP¡¡L¡¡I¡¡CA¡¡TI¡¡O¡¡N¡¡¡¡¡¡CO¡¡N¡¡F¡¡I¡¡G¡¡U¡¡R¡¡AT¡¡IO¡¡N¡¡¡¡¡¡AN¡¡D¡¡¡¡¡¡D¡¡Y¡¡N¡¡A¡¡M¡¡I¡¡C¡¡¡¡L¡¡O¡¡AD¡¡I¡¡N¡¡G¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Figure¡¡12¡­1¡£¡¡How¡¡ponents¡¡can¡¡be¡¡defined¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡The¡¡referencing¡¡of¡¡individual¡¡projects¡¡is¡¡not¡¡an¡¡issue¡£¡¡The¡¡issue¡¡is¡¡how¡¡each¡¡project¡¡learns¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡about¡¡the¡¡others¡£¡¡In¡¡previous¡¡chapters£»¡¡I¡¡said¡¡that¡¡you¡¡should¡¡use¡¡a¡¡factory£»¡¡because¡¡a¡¡factory¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡takes¡¡away¡¡the¡¡decision¡¡of¡¡what¡¡implementation¡¡to¡¡use¡£¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Let¡¯s¡¡look¡¡at¡¡this¡¡from¡¡the¡¡perspective¡¡of¡¡code¡£¡¡Suppose¡¡the¡¡following¡¡interface¡¡definition¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡is¡¡in¡¡a¡¡project¡¡that¡¡contains¡¡all¡¡interface¡¡definitions¡£¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Public¡¡Interface¡¡IMyInterface¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡End¡¡Interface¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡A¡¡class¡¡that¡¡implements¡¡the¡¡interface¡¡is¡¡defined¡¡in¡¡a¡¡project¡¡called¡¡¡¡Implementations¡£¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Class¡¡MyImplementation¡¡£º¡¡Implements¡¡IMyInterface¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡End¡¡Class¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡If¡¡a¡¡class¡¡in¡¡another¡¡project¡¡wants¡¡to¡¡use¡¡the¡¡functionality¡¡of¡¡MyImplementation£»¡¡then¡¡this¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡factory¡¡is¡¡created£º¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Public¡¡Module¡¡Factory¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Public¡¡Function¡¡Instantiate£¨£©¡¡As¡¡IMyInterface¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Return¡¡New¡¡MyImplementation£¨£©¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡End¡¡Function¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡End¡¡Module¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Because¡¡MyImplementation¡¡is¡¡not¡¡declared¡¡as¡¡¡¡Public£»¡¡the¡¡Factory¡¡module¡¡must¡¡be¡¡defined¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡in¡¡the¡¡project¡¡Implementations¡£¡¡This¡¡implies¡¡that¡¡the¡¡project¡¡that¡¡uses¡¡the¡¡functionality¡¡has¡¡a¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡reference¡¡to¡¡Implementations¡£¡¡


¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­Page¡¡337¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡CH¡¡AP¡¡T¡¡E¡¡R¡¡¡¡¡¡1¡¡2¡¡¡¡¡¡¡ö¡¡¡¡¡¡¡¡L¡¡E¡¡AR¡¡N¡¡IN¡¡G¡¡¡¡¡¡AB¡¡O¡¡U¡¡T¡¡¡¡¡¡AP¡¡P¡¡L¡¡I¡¡CAT¡¡I¡¡ON¡¡¡¡¡¡CO¡¡N¡¡F¡¡IG¡¡U¡¡R¡¡AT¡¡IO¡¡N¡¡¡¡¡¡A¡¡N¡¡D¡¡¡¡¡¡D¡¡Y¡¡N¡¡A¡¡M¡¡IC¡¡¡¡¡¡L¡¡O¡¡AD¡¡IN¡¡G¡¡315¡¡



¡¡¡¡¡¡¡¡¡¡Using¡¡a¡¡factory¡¡is¡¡acceptable¡¡and¡¡solves¡¡the¡¡problem¡¡of¡¡decoupling¡¡so¡¡that¡¡the¡¡user¡¡of¡¡the¡¡¡¡

implementation¡¡does¡¡not¡¡need¡¡to¡¡know¡¡about¡¡the¡¡implementation¡£¡¡The¡¡user¡¡does¡¡not¡¡have¡¡to¡¡¡¡

know¡¡the¡¡name¡¡of¡¡the¡¡implementation£»¡¡but¡¡does¡¡need¡¡to¡¡know¡¡in¡¡which¡¡project¡¡the¡¡implemen

tation¡¡resides¡£¡¡This¡¡means¡¡when¡¡you¡¡develop¡¡the¡¡code£»¡¡you¡¡need¡¡to¡¡reference¡¡the¡¡appropriate¡¡¡¡

project¡¡while¡¡coding¡£¡¡This¡¡is¡¡called¡¡ponent¡¡architecture£»¡¡in¡¡that¡¡you¡¡decouple¡¡the¡¡interface¡¡¡¡

from¡¡the¡¡implementation£»¡¡but¡¡you¡¡couple¡¡the¡¡projects¡£¡¡

¡¡¡¡¡¡¡¡¡¡You¡¡want¡¡to¡¡decouple¡¡the¡¡ponents¡¡at¡¡runtime¡¡£¨when¡¡the¡¡application¡¡runs£©¡¡to¡¡solve¡¡the¡¡¡¡

problem¡¡illustrated¡¡in¡¡Chapter¡¡8£»¡¡where¡¡we¡¡created¡¡a¡¡lighting¡¡kernel£»¡¡but¡¡did¡¡not¡¡know¡¡the¡¡lighting¡¡¡¡

implementations¡¡ahead¡¡of¡¡time¡£¡¡Using¡¡configuration£»¡¡you¡¡could¡¡have¡¡an¡¡end¡¡user¡¡¡°plug¡¡in¡±¡¡lighting¡¡¡¡

implementations¡¡that¡¡are¡¡controlled¡¡by¡¡the¡¡kernel¡£¡¡Developers¡¡like¡¡to¡¡call¡¡runtime¡¡decoupling¡¡¡¡

a¡¡plug¡­in¡¡architecture¡¡£¨¡¡http£º//en¡£wikipedia¡£org/wiki/Plugin£©¡£¡¡And¡¡this¡¡is¡¡where¡¡configuration¡¡¡¡

and¡¡convention¡¡e¡¡into¡¡play¡£¡¡¡°Convention¡¡over¡¡configuration¡±¡¡is¡¡a¡¡Ruby¡¡on¡¡Rails¡¡philosophy¡£¡¡¡¡

The¡¡idea¡¡is¡¡that¡¡developers¡¡define¡¡only¡¡the¡¡nonconventional¡¡parts¡¡of¡¡their¡¡applications¡£¡¡



Decoupling¡¡Using¡¡a¡¡Configuration¡¡Architecture¡¡



In¡¡a¡¡runtime¡¡configuration¡¡scenario£»¡¡the¡¡architecture¡¡of¡¡Figure¡¡12¡­1¡¡is¡¡not¡¡altered£»¡¡it¡¡still¡¡has¡¡the¡¡¡¡

definitions£»¡¡implementations£»¡¡kernel£»¡¡and¡¡user¡¡assemblies¡£¡¡What¡¡is¡¡altered¡¡is¡¡how¡¡the¡¡references¡¡to¡¡¡¡

each¡¡of¡¡the¡¡pieces¡¡are¡¡created¡£¡¡¡¡

¡¡¡¡¡¡¡¡¡¡Let¡¯s¡¡start¡¡with¡¡a¡¡simple¡¡situation¡£¡¡You¡¡have¡¡a¡¡question£»¡¡and¡¡you¡¡happen¡¡to¡¡know¡¡who¡¡would¡¡¡¡

know¡¡the¡¡answer¡£¡¡You¡¡know¡¡the¡¡person¡¡and¡¡you¡¡know¡¡she¡¡has¡¡a¡¡telephone¡£¡¡What¡¡you¡¡don¡¯t¡¡¡¡

know¡¡is¡¡her¡¡telephone¡¡number¡£¡¡Translated¡¡into¡¡programming¡¡terms£»¡¡the¡¡telephone¡¡acts¡¡as¡¡an¡¡¡¡

interface¡¡to¡¡an¡¡implementation¡£¡¡The¡¡challenge¡¡is¡¡connecting¡¡to¡¡the¡¡implementation¡£¡¡In¡¡the¡¡¡¡

case¡¡of¡¡the¡¡telephone£»¡¡you¡¡can¡¡discover¡¡the¡¡telephone¡¡number¡¡by¡¡using¡¡the¡¡telephone¡¡book¡£¡¡¡¡

¡¡¡¡¡¡¡¡¡¡The¡¡telephone¡¡book¡¡contains¡¡the¡¡names¡¡of¡¡individuals¡¡at¡¡specific¡¡addresses¡¡and¡¡their¡¡tele

phone¡¡numbers¡£¡¡Names¡¡and¡¡addresses¡¡are¡¡easy¡¡to¡¡remember£»¡¡telephone¡¡numbers¡¡are¡¡a¡¡bit¡¡¡¡

more¡¡plicated¡£¡¡Thus£»¡¡the¡¡telephone¡¡book¡¡serves¡¡the¡¡purpose¡¡of¡¡cross¡­referencing¡¡an¡¡easy¡¡¡¡

piece¡¡of¡¡information¡¡with¡¡a¡¡more¡¡plicated¡¡piece¡¡of¡¡information¡£¡¡In¡¡programming¡¡terms£»¡¡¡¡

the¡¡cross¡­referencing¡¡is¡¡a¡¡configuration¡¡file¡¡that¡¡is¡¡associated¡¡with¡¡the¡¡¡¡application¡£¡¡Once¡¡¡¡

you¡¡have¡¡cross¡­referenced¡¡the¡¡information£»¡¡you¡¡have¡¡the¡¡location¡¡of¡¡the¡¡project¡¡and¡¡can¡¡then¡¡¡¡

instantiate¡¡the¡¡cross¡­referenced¡¡type¡£¡¡In¡¡programming¡¡terms£»¡¡the¡¡configuration¡¡file¡¡gives¡¡you¡¡¡¡

the¡¡location¡¡and¡¡name¡¡of¡¡the¡¡type¡£¡¡



Decoupling¡¡Using¡¡a¡¡Convention¡¡Architecture¡¡



Configuration¡¡files¡¡are¡¡useful£»¡¡but¡¡they¡¡can¡¡bee¡¡too¡¡plicated¡£¡¡Some¡¡projects¡¡have¡¡such¡¡¡¡

plicated¡¡configuration¡¡files¡¡that¡¡bugs¡¡arise¡¡due¡¡to¡¡an¡¡improperly¡¡configured¡¡application¡£¡¡

¡¡¡¡¡¡¡¡¡¡Convention¡¡architecture¡¡attempts¡¡to¡¡simplify¡¡plexity¡¡by¡¡instituting¡¡a¡¡familiar¡¡pattern¡¡¡¡

to¡¡the¡¡referencing¡¡of¡¡the¡¡type¡£¡¡Consider¡¡a¡¡telephone¡¡number¡¡like¡¡1¡­800¡­BIG¡­CARS¡£¡¡The¡¡1¡¡and¡¡¡¡

800¡¡are¡¡easy¡¡to¡¡remember£»¡¡as¡¡is¡¡BIG¡¡CARS¡£¡¡This¡¡works¡¡because¡¡of¡¡the¡¡convention¡¡where¡¡a¡¡digit¡¡¡¡

on¡¡the¡¡telephone¡¡keypad¡¡corresponds¡¡to¡¡three¡¡or¡¡four¡¡letters¡£¡¡So¡¡in¡¡the¡¡case¡¡of¡¡BIG¡­CARS£»¡¡the¡¡¡¡

number¡¡is¡¡244¡­2277¡£¡¡

¡¡¡¡¡¡¡¡¡¡Conventions¡¡are¡¡good¡¡things¡¡as¡¡long¡¡as¡¡you¡¡know¡¡what¡¡they¡¡are¡£¡¡For¡¡example£»¡¡if¡¡you¡¡were¡¡¡¡

not¡¡familiar¡¡with¡¡the¡¡telephone¡¡system£»¡¡you¡¡would¡¡wonder¡¡how¡¡BIG¡¡CARS¡¡represents¡¡a¡¡telephone¡¡¡¡

number¡£¡¡The¡¡missing¡¡piece¡¡of¡¡information¡¡is¡¡the¡¡convention¡¡of¡¡how¡¡to¡¡convert¡¡the¡¡letters¡¡into¡¡¡¡

the¡¡numbers¡£¡¡


¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­Page¡¡338¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­

316¡¡¡¡¡¡¡¡¡¡¡¡¡¡CH¡¡AP¡¡T¡¡E¡¡R¡¡¡¡¡¡1¡¡2¡¡¡¡¡¡¡ö¡¡¡¡¡¡¡¡L¡¡E¡¡A¡¡R¡¡N¡¡I¡¡N¡¡G¡¡¡¡¡¡A¡¡B¡¡OU¡¡T¡¡¡¡¡¡A¡¡PP¡¡L¡¡I¡¡CA¡¡TI¡¡O¡¡N¡¡¡¡¡¡CO¡¡N¡¡F¡¡I¡¡G¡¡U¡¡R¡¡AT¡¡IO¡¡N¡¡¡¡¡¡AN¡¡D¡¡¡¡¡¡D¡¡Y¡¡N¡¡A¡¡M¡¡I¡¡C¡¡¡¡L¡¡O¡¡AD¡¡I¡¡N¡¡G¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡What¡¡is¡¡useful¡¡with¡¡convention¡¡architecture¡¡is¡¡that¡¡you¡¡are¡¡not¡¡limited¡¡to¡¡what¡¡is¡¡defined¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡in¡¡the¡¡configuration¡¡file£»¡¡as¡¡there¡¡is¡¡a¡¡general¡¡logic¡£¡¡When¡¡implementing¡¡a¡¡convention¡¡architec

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ture£»¡¡you¡¡are¡¡not¡¡discarding¡¡configuration£»¡¡but¡¡you¡¡are¡¡making¡¡assumptions¡¡for¡¡the¡¡user¡¡and¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡implementation¡¡of¡¡the¡¡code¡£¡¡You¡¡will¡¡still¡¡probably¡¡have¡¡a¡¡configuration¡¡file£»¡¡but¡¡the¡¡configuration¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡is¡¡for¡¡specific¡¡functionality¡£¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Regardless¡¡of¡¡whether¡¡you¡¡use¡¡a¡¡configuration¡¡architecture¡¡or¡¡a¡¡convention¡¡architecture£»¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡you¡¡will¡¡dynamically¡¡load¡¡assemblies£»¡¡as¡¡demonstrated¡¡in¡¡this¡¡chapter¡£¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Setting¡¡Up¡¡the¡¡Dynamic¡¡Loading¡¡Projects¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡For¡¡this¡¡chapter¡¯s¡¡examples£»¡¡four¡¡projects¡¡are¡¡defined£º¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡o¡¡¡¡Definitions£º¡¡A¡¡class¡¡library¡¡that¡¡contains¡¡the¡¡definition¡¡for¡¡the¡¡interface¡¡IDefinition¡¡and¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡the¡¡class¡¡ConfigurationLoader¡£¡¡The¡¡class¡¡ConfigurationLoader¡¡will¡¡contain¡¡the¡¡functionality¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡to¡¡dynamically¡¡load¡¡the¡¡assemblies¡¡¡¡Implementations1¡¡and¡¡Implementations2¡£¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡o¡¡¡¡Implementations1£º¡¡A¡¡class¡¡library¡¡that¡¡contains¡¡the¡¡class¡¡Implementation¡¡and¡¡implements¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡the¡¡interface¡¡IDefinition¡£¡¡The¡¡class¡¡Implementation¡¡is¡¡defined¡¡in¡¡the¡¡namespace¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Implementations1¡¡and¡¡is¡¡not¡¡declared¡¡¡¡Public¡£¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡o¡¡¡¡Implementations2£º¡¡A¡¡class¡¡library¡¡that¡¡contains¡¡the¡¡class¡¡Implementation¡¡and¡¡imple

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ments¡¡the¡¡interface¡¡IDefinition¡£¡¡The¡¡class¡¡Implementation¡¡is¡¡defined¡¡in¡¡the¡¡namespace¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Implementations2¡¡and¡¡is¡¡not¡¡declared¡¡¡¡Public¡£¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡o¡¡¡¡CallRuntimeImplementation£º¡¡A¡¡console¡¡application¡¡that¡¡will¡¡be¡¡referenced¡¡throughout¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡the¡¡chapter¡¡as¡¡the¡¡user¡¡application¡£¡¡¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡In¡¡the¡¡Definitions¡¡project£»¡¡the¡¡references¡¡are¡¡to¡¡the¡¡standard¡¡¡¡libraries¡¡£¨¡¡System£»¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡System¡£Core£»¡¡and¡¡so¡¡on£©¡£¡¡The¡¡unique¡¡reference¡¡that¡¡you¡¡need¡¡to¡¡add¡¡is¡¡to¡¡System¡£configuration¡£¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡The¡¡System¡£configuration¡¡reference¡¡contains¡¡the¡¡types¡¡that¡¡you¡¡need¡¡to¡¡read¡¡the¡¡application¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡configuration¡¡file¡£¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Here¡¡is¡¡the¡¡code¡¡for¡¡IDefinition£º¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Public¡¡Interface¡¡IDefinition¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Function¡¡TranslateWord£¨ByVal¡¡word¡¡As¡¡String£©¡¡As¡¡String¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡End¡¡Interface¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡The¡¡Implementations1¡¡project¡¡contains¡¡the¡¡file¡¡¡¡Implementation¡£vb£»¡¡which¡¡is¡¡the¡¡type¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Implementation¡¡and¡¡implements¡¡the¡¡interface¡¡¡¡IDefinitions¡£¡¡The¡¡implementation¡¡of¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Implementation¡¡is¡¡as¡¡follows¡¡£¨make¡¡sure¡¡you¡¡add¡¡a¡¡reference¡¡to¡¡the¡¡Definitions¡¡project£©£º¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Imports¡¡Definitions¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Class¡¡Implementation¡¡£º¡¡Implements¡¡IDefinition¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Public¡¡Function¡¡TranslateWord£¨ByVal¡¡word¡¡As¡¡String£©¡¡_¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡As¡¡String¡¡Implements¡¡IDefinition¡£TranslateWord¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Return¡¡¡¨¡¨¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡End¡¡Function¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡End¡¡Class¡¡


¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­Page¡¡339¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡CH¡¡AP¡¡T¡¡E¡¡R¡¡¡¡¡¡1¡¡2¡¡¡¡¡¡¡ö¡¡¡¡¡¡¡¡L¡¡E¡¡AR¡¡N¡¡IN¡¡G¡¡¡¡¡¡AB¡¡O¡¡U¡¡T¡¡¡¡¡¡AP¡¡P¡¡L¡¡I¡¡CAT¡¡I¡¡ON¡¡¡¡¡¡CO¡¡N¡¡F¡¡IG¡¡U¡¡R¡¡AT¡¡IO¡¡N¡¡¡¡¡¡A¡¡N¡¡D¡¡¡¡¡¡D¡¡Y¡¡N¡¡A¡¡M¡¡IC¡¡¡¡¡¡L¡¡O¡¡AD¡¡IN¡¡G¡¡317¡¡



¡¡¡¡¡¡¡¡¡¡The¡¡class¡¡Implementation¡¡has¡¡a¡¡hard¡¡reference¡¡to¡¡¡¡IDefinition£»¡¡so¡¡under¡¡the¡¡References¡¡¡¡

node¡¡in¡¡the¡¡Implementations1¡¡project¡¡is¡¡a¡¡reference¡¡to¡¡the¡¡Definitions¡¡project¡£¡¡Because¡¡there¡¡¡¡

is¡¡a¡¡hard¡¡reference¡¡to¡¡IDefinition£»¡¡the¡¡interface¡¡IDefinition¡¡is¡¡declared¡¡as¡¡Public£»¡¡but¡¡¡¡

Implementation¡¡is¡¡not¡£¡¡

¡¡¡¡¡¡¡¡¡¡The¡¡Implementations2¡¡project¡¡has¡¡the¡¡same¡¡implementation¡¡and¡¡reference¡¡to¡¡Definitions¡¡¡¡

as¡¡Implementations1¡£¡¡What¡¡is¡¡special¡¡about¡¡Implementations2¡¡is¡¡its¡¡use¡¡of¡¡a¡¡strong¡¡name£»¡¡which¡¡¡¡

makes¡¡it¡¡unique¡£¡¡Thus¡¡far£»¡¡all¡¡of¡¡your¡¡assemblies¡¡are¡¡not¡¡unique¡£¡¡To¡¡make¡¡them¡¡unique£»¡¡you¡¡¡¡

need¡¡to¡¡enable¡¡signing¡£¡¡You¡¡must¡¡also¡¡enable¡¡signing¡¡in¡¡the¡¡Definitions¡¡project¡£¡¡The¡¡next¡¡¡¡

section¡¡describes¡¡how¡¡to¡¡enable¡¡signing¡£¡¡

¡¡¡¡¡¡¡¡¡¡The¡¡CallRuntimeImplementation¡¡project¡¡
·µ»ØĿ¼ ÉÏÒ»Ò³ ÏÂÒ»Ò³ »Øµ½¶¥²¿ ÔÞ£¨11£© ²È£¨11£©
¿ì½Ý²Ù×÷: °´¼üÅÌÉÏ·½Ïò¼ü ¡û »ò ¡ú ¿É¿ìËÙÉÏÏ·­Ò³ °´¼üÅÌÉ쵀 Enter ¼ü¿É»Øµ½±¾ÊéĿ¼ҳ °´¼üÅÌÉÏ·½Ïò¼ü ¡ü ¿É»Øµ½±¾Ò³¶¥²¿!
ÎÂÜ°Ìáʾ£º ο´Ð¡ËµµÄͬʱ·¢±íÆÀÂÛ£¬Ëµ³ö×Ô¼ºµÄ¿´·¨ºÍÆäËüС»ï°éÃÇ·ÖÏíÒ²²»´íŶ£¡·¢±íÊéÆÀ»¹¿ÉÒÔ»ñµÃ»ý·ÖºÍ¾­Ñé½±Àø£¬ÈÏÕæдԭ´´ÊéÆÀ ±»²ÉÄÉΪ¾«ÆÀ¿ÉÒÔ»ñµÃ´óÁ¿½ð±Ò¡¢»ý·ÖºÍ¾­Ñé½±ÀøŶ£¡