Writing /home/infogasy/domains/wiki.infogasy.net/public_html/data/cache/e/e508f889c202e887743cf06fbe5be277.xhtml failed

Fomba iray fampifandraisana Assembly 2 DotNet 2.0

Misy fomba iray ahafahanao miantso fonction iray anaty Assembly A anaty Assembly B na dia Internal azany.

Izany hoe raha tsorina dia manana DLL anakiroa isika IFG.DAL.DLL sy IFG.BLL.DLL ohatra.

Raha misy fonction AddUser() ohatra ao anatin’ny DAL,dia tsy tiako hatao public izy io satria: manjary tonga dia afaka mampiasa IFG.DAL.DLL ny developpeur dia mampiasa azy.

Noho izany, tokony ferana ny function azon’izy ireo hampiasaina,ka ny function anaty ny IFG.BLL.DLL ihany no hatao public.

Olana anefa raha hatao internal ny fonction AddUser() dia tsy afaka mampiasa izany ny IFG.BLL.DLL. Ka izany no hahatongavantsika eo amin’ilay hoe internalsvisibletoattribute

izany hoe tenenina anaty DAL hoe BLL afaka mampiasa ireo fonction internal. Tsy maintsy soniavina anefa ilay IFG.BLL.DLL amin’izay tsy misy afaka misandoka, koa moa ilaina ny PublicKey ny. ohatra izao ny fampiasana azy:

[[assembly:InternalsVisibleToAttribute("IFG.BLL.DLL, PublicKey=32ab4ba45e0a69a1")]]

ity ny rohy ahitanao fanazavana fanampiny. InternalsVisibleToAttribute MSDN

 

internalsvisibletoattribute.txt · Novaina farany:: 2008/09/11 12:43