MarshalByValueComponent 類別

定義

實作 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
[System.ComponentModel.TypeConverter(typeof(System.ComponentModel.ComponentConverter))]
[System.Runtime.InteropServices.ComVisible(true)]
public class MarshalByValueComponent : IDisposable, IServiceProvider, System.ComponentModel.IComponent
type MarshalByValueComponent = class
    interface IComponent
    interface IServiceProvider
    interface IDisposable
Public Class MarshalByValueComponent
Implements IComponent, IDisposable, IServiceProvider
繼承
MarshalByValueComponent
衍生
屬性
實作

備註

元件可以包含在容器中。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 類別的新執行個體。Initializes a new instance of the MarshalByValueComponent class.

屬性

Container

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

DesignMode

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

Events

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

Site

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

方法

Dispose()

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

Dispose(Boolean)

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

Equals(Object)

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

(繼承來源 Object)
Finalize()

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

GetHashCode()

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

(繼承來源 Object)
GetService(Type)

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

GetType()

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

(繼承來源 Object)
MemberwiseClone()

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

(繼承來源 Object)
ToString()

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

事件

Disposed

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

適用於

另請參閱