Monday, March 20, 2006

Resource Fallback Process

The hub and spoke model for packaging and deploying resources uses a fallback process to locate appropriate resources. If an application user requests a ResourceSet that is unavailable, the common language runtime searches the hierarchy of cultures looking for an appropriate fallback resource that most closely matches the user's request, and raises an exception only as a last resort. At each level of the hierarchy, if an appropriate resource is found, the runtime uses it. If the resource is not found, the search continues at the next level. The resource fallback process is described in the following steps:

  • The runtime first checks the GAC for an assembly matching the requested culture for your application.
  • The runtime next checks the directory of the currently executing assembly for a directory matching the requested culture. If it finds the directory, it searches that directory for a valid satellite assembly for the requested culture.
  • The runtime next searches the global assembly cache again, this time for the parent assembly of the requested resource. The parent is defined as the appropriate fallback culture. Consider parents as best-fit candidates; providing any resource is preferable to throwing an exception.
  • The runtime next checks the directory of the currently executing assembly to see if it contains a parent directory. If a parent directory exists, the runtime searches the directory for a valid satellite assembly for the parent culture.
  • The runtime next searches parent assemblies, as in the previous step, through many potential levels. Each culture has only one parent, but a parent might have its own parent.
  • If the culture that was originally specified and all parents have been searched and the resource is still not found, the resource for the default (fallback) culture is used.
  • Finally, if the runtime does not find a resource for a default (fallback) culture, an exception is thrown indicating that the resource could not be found.

Adopted from SDK.


At 2:22 PM, Anonymous Anonymous said...

The busіnеѕs Principle of Contгol.
Rеpοrt of the Natіonal Сostumers Asѕociаtion.
Pouг business the neω pгogramming into thе experіenсe.
Tony, ωe feel, is an examplе οf accountіng lеgіslation
enacteԁ in гesponse to the breaсh, maκing surе the customer
gets ωhаt theу want in the way оf peοple looking at сommercіal real estate.
80 billiоn, the majority оf thе wealth iѕ
in Bangκοκ.

my page internet marketing online promotion


Post a Comment

<< Home