Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Modular Design Question
Message
General information
Forum:
ASP.NET
Category:
Class design
Miscellaneous
Thread ID:
01460339
Message ID:
01460486
Views:
30
>>>>>Assume I were to develop an app that has multiple modules, where each module was in it's own project, and all the modules were
>>>>>based on a base class, do I need to ship the base class when I install? Or is the base compiled into each individual module?
>>>>
>>>>All my applications have a Framework.dll class, which contains all the base classes. So, yes, I have to ship that as well as the client application.
>>>
>>>So how do you prevent another developer from loading and using the that DLL?
>>
>>You can use LinkDemand to ensure that the assembly is only accessible from specific other assemblies:
>>Here's a simple explanation:http://searchsoftwarequality.techtarget.com/tip/0,289483,sid92_gci1196456,00.html
>
>I spent some time looking at the MSDN articles. Do you know of any examples of using Demand/LinkDemand?
TBH I only looked at it briefly some time ago so would need to refresh myself again which I don't have time for today :-{

You might also look at Friend Assemblies as an alternative :
http://msdn.microsoft.com/library/0tke9fxk(en-us,vs.80).aspx

Basically you keep members that should only be accessed by your own assemblies as internal and use the InternalsVisibleTo attribute to list those assemblies.
But I don't know how that would behave with inheritance...

As a third option you could adopt a DIY approach - use reflection to check the running EXE (maybe Assembly.GetEntryAssembly() - but check me on that)
Previous
Reply
Map
View

Click here to load this message in the networking platform