MarshalByValueComponent MarshalByValueComponent MarshalByValueComponent MarshalByValueComponent Class


實作 IComponent 並且提供由數值 (傳遞序列化物件的複本) 所封送處理之可遠端使用元件的基底實作。Implements IComponent and provides the base implementation for remotable components that are marshaled by value (a copy of the serialized object is passed).

public ref class MarshalByValueComponent : IDisposable, IServiceProvider, System::ComponentModel::IComponent
public class MarshalByValueComponent : IDisposable, IServiceProvider, System.ComponentModel.IComponent
type MarshalByValueComponent = class
    interface IComponent
    interface IServiceProvider
    interface IDisposable
Public Class MarshalByValueComponent
Implements IComponent, IDisposable, IServiceProvider


元件可以包含在容器中。A component can be contained in a container. 針對容器中的每個元件, 容器會建立用來管理元件的網站。For each component in a container, the container creates a site that it uses to manage the component. 元件主要會透過容器所提供ISite的來與其容器互動, 這是容器特定、每個元件的資訊存放庫。The component interacts with its container primarily through a container-provided ISite, which is a repository of container-specific, per-component information.


當您繼承自這個類別時, 您可以覆Dispose()Site、和GetService(Type)方法。When you inherit from this class, you can override the Dispose(), Site, and the GetService(Type) methods.


MarshalByValueComponent() MarshalByValueComponent() MarshalByValueComponent() MarshalByValueComponent()

初始化 MarshalByValueComponent 類別的新執行個體。Initializes a new instance of the MarshalByValueComponent class.


Container Container Container Container

取得元件的容器。Gets the container for the component.

DesignMode DesignMode DesignMode DesignMode

取得值,表示元件目前是否處於設計模式。Gets a value indicating whether the component is currently in design mode.

Events Events Events Events

取得附加在這個元件上的事件處理常式清單。Gets the list of event handlers that are attached to this component.

Site Site Site Site

取得或設定元件的站台。Gets or sets the site of the component.


Dispose() Dispose() Dispose() Dispose()

釋放 MarshalByValueComponent 所使用的所有資源。Releases all resources used by the MarshalByValueComponent.

Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

釋放 MarshalByValueComponent 所使用的 Unmanaged 資源,並選擇性地釋放 Managed 資源。Releases the unmanaged resources used by the MarshalByValueComponent and optionally releases the managed resources.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
Finalize() Finalize() Finalize() Finalize()

允許物件在記憶體回收進行回收之前,嘗試釋放資源並執行其他清除作業。Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetService(Type) GetService(Type) GetService(Type) GetService(Type)

取得 IServiceProvider 的實作器。Gets the implementer of the IServiceProvider.

GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

傳回任何包含 Component 名稱的 StringReturns a String containing the name of the Component, if any. 不應覆寫此方法。This method should not be overridden.


Disposed Disposed Disposed Disposed

加入事件處理常式來接聽 (Listen) 元件上的 Disposed 事件。Adds an event handler to listen to the Disposed event on the component.