HighTechTalks DotNet Forums  

make Internal access more logical and less physical

Dotnet Framework (CLR) microsoft.public.dotnet.framework.clr


Discuss make Internal access more logical and less physical in the Dotnet Framework (CLR) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Mountain
 
Posts: n/a

Default make Internal access more logical and less physical - 05-22-2006 , 08:02 PM






If a large framework (or library, application, etc.) has optional parts
and some users may not want all parts, it would make sense to break the
framework into separate physical assemblies. However, if internal
access is specified in the monolithic framework, a problem arises
because changing internal access to public changes the design
intention. Something other than public is required, yet internal
doesn't work anymore (even though the logical design of the code has
not changed).

The large framework is still logically one unit, but it has been
physically arranged as two or more assemblies strictly for efficiency
or flexibility. Why should we not have a way to define an internal
access level for the _logical_ unit? In an imaginary future version of
C#, this might be something like the internal access modifier scoped by
namespace. . .

Is there any way to accomplish what I'm after in C# 2.0? Thanks.


Reply With Quote
  #2  
Old   
Barry Kelly
 
Posts: n/a

Default Re: make Internal access more logical and less physical - 05-22-2006 , 08:17 PM






"Mountain" <dshiel (AT) yahoo (DOT) com> wrote:

Quote:
Why should we not have a way to define an internal
access level for the _logical_ unit? In an imaginary future version of
C#, this might be something like the internal access modifier scoped by
namespace. . .

Is there any way to accomplish what I'm after in C# 2.0? Thanks.
There is. Look up friend assemblies in the MSDN documentation.

-- Barry

--
http://barrkel.blogspot.com/


Reply With Quote
  #3  
Old   
Jon Shemitz
 
Posts: n/a

Default Re: make Internal access more logical and less physical - 05-22-2006 , 10:08 PM



Mountain wrote:

Quote:
If a large framework (or library, application, etc.) has optional parts
and some users may not want all parts, it would make sense to break the
framework into separate physical assemblies. However, if internal
access is specified in the monolithic framework, a problem arises
because changing internal access to public changes the design
intention. Something other than public is required, yet internal
doesn't work anymore (even though the logical design of the code has
not changed).

The large framework is still logically one unit, but it has been
physically arranged as two or more assemblies strictly for efficiency
or flexibility. Why should we not have a way to define an internal
access level for the _logical_ unit? In an imaginary future version of
C#, this might be something like the internal access modifier scoped by
namespace. . .

Is there any way to accomplish what I'm after in C# 2.0? Thanks.
Yes. There's even a way to accomplish it in 1.0.

While most assemblies are a single PE file, this is not a requirement:
You can break your assembly into multiple modules, united by a
manifest. Internal visibility applies across the whole assembly, but
you can have different contents in different builds.

--

..NET 2.0 for Delphi Programmers <http://www.midnightbeach.com/.net>

Delphi skills make .NET easy to learn
Being printed - in stores by June


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.