.NET Framework Class Library Design Question - ISite, IComponent and IContainer

G

Guest

I have copied the associated interfaces from MSDN below. The problem is that
I do not completely understand why it is designed in that way? What is ISite
for and is it really useful? And finally does anybody know new enhancements
in this design on Whidbey?

Copied from MSDN for your convenience:
public interface ISite : IServiceProvider
{
IComponent Component {get;}
IContainer Container {get;}
bool DesignMode {get;}
string Name {get; set;}
}

public interface IComponent : IDisposable
{
ISite Site {get; set;}
event EventHandler Disposed;
}

public interface IContainer : IDisposable
{
ComponentCollection Components {get;}

void Add( IComponent component );
void Add( IComponent component, string name );
void Remove( IComponent component );
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top