Re: Exposing internal members of an assembly

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



<mmkhajah@xxxxxxxxx> wrote:
I am trying to have a set of base classes and interfaces of an
application framework in their own assembly. That way, concrete
implementations of the API will reference that assembly and implement
the abstract classes and interfaces.

The problem is that some parts of the API are "internal" in the sense
that they are internal to the implementation. If I declare these parts
as internal in the API, the implementations will not be able to access
them.

The reason behind using "internal" members is to eliminate the need for
the proxy design pattern so I can pass objects between the implemation
and the GUI directly whilst ensuring that the appropriate access levels
are maintained.

Any thoughts?

So you want the derived classes to have access to the members in the
base classes, but you don't want other classes to have access to those
members? If so, you just need protected access.

--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.



Relevant Pages

  • Re: Pointer to "base" type - what does the Standard say about this?
    ... Since the `api' is the first element ... in each struct, it is always safe to convert the struct pointer to ... all of my implementations can (and in fact ... The interfaces are used by the rest of the ...
    (comp.lang.c)
  • Exposing internal members of an assembly
    ... I am trying to have a set of base classes and interfaces of an ... the abstract classes and interfaces. ... The problem is that some parts of the API are "internal" in the sense ... the implementations will not be able to access ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: [Lit.] Buffer overruns
    ... The code I posted was intended to illustrate the API, ... >to suggest perfect implementations of the API, ... interfaces to the basic string stuff, memory allocation, I/O, printf, ...
    (sci.crypt)
  • Re: F16 unusable while writing to pendrive
    ... file instead of putting the first chunk into the first place it finds. ... the low-level APIs involved with file creation. ... Some filesystem implementations may allow this and some not, ... win32 api and it seems there´s no api to create a fixed-size empty ...
    (Fedora)
  • Re: Sport 2.031 with image startup/shutdown support
    ... The key thing is that the API in Squeak is as close to the VW one as possible. ... Leandro (the Visual Smalltalk Sport implementor) suggests that we should define the Sport API in terms of SUnit tests. ... It's more a matter of nobody being surprised and keeping the API straight and all the implementations in line. ...
    (comp.lang.smalltalk)