This implementation of the IComponent interface uses marshal- by-value semantics rather than the marshal-by-reference semantics employed by its cousin Component . public class MarshalByValueComponent : IComponent, IDisposable, IServiceProvider { // Public Constructors public MarshalByValueComponent (); // Public Instance Properties public virtual IContainer Container {get; } public virtual bool DesignMode {get; } public virtual ISite Site {set; get; } // implements IComponent // Protected Instance Properties protected EventHandlerList Events {get; } // Public Instance Methods public void Dispose (); // implements IDisposable public virtual object GetService (Type service ); // implements IServiceProvider public override string ToString (); // overrides object // Protected Instance Methods protected virtual void Dispose (bool disposing ); protected override void Finalize (); // overrides object // Events public event EventHandler Disposed ; // implements IComponent } |