Un paio di tool molto utili per lo sviluppo web: FireBug e FireCookie.
Il primo è un plugin per Firefox che permette di vedere il codice javascript e scovare bug ed errori (oltre ad altre cose interessanti). Il secondo, FireCookie, è un plugin per FireBug che permette di vedere e modificare i cookie impostati durante la navigazione di un sito.
Entrambo molto utili.
venerdì, giugno 20, 2008
venerdì, giugno 13, 2008
Use an internal class from another assembly
In big projects many classes has marked as internal. Tipically they are classes for internal activities and nobody needs to reference them from outside the assemply.
But, when you're developing you need to call them directly for testing/debugging. But... you cannot do that. The classes are internal.
There is a solution: mark the assembly as "friend" of another. An example: 2 assembly. MyLib with namy internal classes. DevTestApp, the test/development application with reference to MyLib. In the MyLib source code add:
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("DevTestApp")]
Now, from DevTestApp you can use public and internal classes from MyLib.
More details: http://msdn.microsoft.com/en-us/library/0tke9fxk(VS.80).aspx
But, when you're developing you need to call them directly for testing/debugging. But... you cannot do that. The classes are internal.
There is a solution: mark the assembly as "friend" of another. An example: 2 assembly. MyLib with namy internal classes. DevTestApp, the test/development application with reference to MyLib. In the MyLib source code add:
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("DevTestApp")]
Now, from DevTestApp you can use public and internal classes from MyLib.
More details: http://msdn.microsoft.com/en-us/library/0tke9fxk(VS.80).aspx
Iscriviti a:
Post (Atom)