ComponentInstaller 类

定义

指定一个安装程序,该程序从组件复制属性以供安装时使用。Specifies an installer that copies properties from a component to use at install time.

public ref class ComponentInstaller abstract : System::Configuration::Install::Installer
public abstract class ComponentInstaller : System.Configuration.Install.Installer
type ComponentInstaller = class
    inherit Installer
Public MustInherit Class ComponentInstaller
Inherits Installer
继承
派生

继承者说明

当从ComponentInstaller继承时, 必须CopyFromComponent(IComponent)重写方法Install(IDictionary) , 并且通常会重写和Uninstall(IDictionary)方法。When you inherit from ComponentInstaller, you must override the CopyFromComponent(IComponent) method, and typically override the Install(IDictionary) and Uninstall(IDictionary) methods.

构造函数

ComponentInstaller()

初始化 ComponentInstaller 类的新实例。Initializes a new instance of the ComponentInstaller class.

属性

CanRaiseEvents

获取一个指示组件是否可以引发事件的值。Gets a value indicating whether the component can raise an event.

(继承自 Component)
Container

获取 IContainer,它包含 ComponentGets the IContainer that contains the Component.

(继承自 Component)
Context

获取或设置关于当前安装的信息。Gets or sets information about the current installation.

(继承自 Installer)
DesignMode

获取一个值,用以指示 Component 当前是否处于设计模式。Gets a value that indicates whether the Component is currently in design mode.

(继承自 Component)
Events

获取附加到此 Component 的事件处理程序的列表。Gets the list of event handlers that are attached to this Component.

(继承自 Component)
HelpText

获取安装程序集合中所有安装程序的帮助文字。Gets the help text for all the installers in the installer collection.

(继承自 Installer)
Installers

获取该安装程序包含的安装程序的集合。Gets the collection of installers that this installer contains.

(继承自 Installer)
Parent

获取或设置包含该安装程序所属的集合的安装程序。Gets or sets the installer containing the collection that this installer belongs to.

(继承自 Installer)
Site

获取或设置 ComponentISiteGets or sets the ISite of the Component.

(继承自 Component)

方法

Commit(IDictionary)

在派生类中重写时,完成安装事务。When overridden in a derived class, completes the install transaction.

(继承自 Installer)
CopyFromComponent(IComponent)

在派生类中被重写时,从指定的组件复制安装时需要的所有属性。When overridden in a derived class, copies all the properties that are required at install time from the specified component.

CreateObjRef(Type)

创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(继承自 MarshalByRefObject)
Dispose()

释放由 Component 使用的所有资源。Releases all resources used by the Component.

(继承自 Component)
Dispose(Boolean)

释放由 Component 占用的非托管资源,还可以另外再释放托管资源。Releases the unmanaged resources used by the Component and optionally releases the managed resources.

(继承自 Component)
Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetLifetimeService()

检索控制此实例的生存期策略的当前生存期服务对象。Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(继承自 MarshalByRefObject)
GetService(Type)

返回一个对象,该对象表示由 Component 或它的 Container 提供的服务。Returns an object that represents a service provided by the Component or by its Container.

(继承自 Component)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
InitializeLifetimeService()

获取生存期服务对象来控制此实例的生存期策略。Obtains a lifetime service object to control the lifetime policy for this instance.

(继承自 MarshalByRefObject)
Install(IDictionary)

在派生类中被重写时,执行安装。When overridden in a derived class, performs the installation.

(继承自 Installer)
IsEquivalentInstaller(ComponentInstaller)

确定指定的安装程序是否与此安装程序安装相同的对象。Determines if the specified installer installs the same object as this installer.

MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
MemberwiseClone(Boolean)

创建当前 MarshalByRefObject 对象的浅表副本。Creates a shallow copy of the current MarshalByRefObject object.

(继承自 MarshalByRefObject)
OnAfterInstall(IDictionary)

引发 AfterInstall 事件。Raises the AfterInstall event.

(继承自 Installer)
OnAfterRollback(IDictionary)

引发 AfterRollback 事件。Raises the AfterRollback event.

(继承自 Installer)
OnAfterUninstall(IDictionary)

引发 AfterUninstall 事件。Raises the AfterUninstall event.

(继承自 Installer)
OnBeforeInstall(IDictionary)

引发 BeforeInstall 事件。Raises the BeforeInstall event.

(继承自 Installer)
OnBeforeRollback(IDictionary)

引发 BeforeRollback 事件。Raises the BeforeRollback event.

(继承自 Installer)
OnBeforeUninstall(IDictionary)

引发 BeforeUninstall 事件。Raises the BeforeUninstall event.

(继承自 Installer)
OnCommitted(IDictionary)

引发 Committed 事件。Raises the Committed event.

(继承自 Installer)
OnCommitting(IDictionary)

引发 Committing 事件。Raises the Committing event.

(继承自 Installer)
Rollback(IDictionary)

在派生类中重写时,还原计算机的安装前状态。When overridden in a derived class, restores the pre-installation state of the computer.

(继承自 Installer)
ToString()

返回包含 Component 的名称的 String(如果有)。Returns a String containing the name of the Component, if any. 不应重写此方法。This method should not be overridden.

(继承自 Component)
Uninstall(IDictionary)

在派生类中重写时,移除安装。When overridden in a derived class, removes an installation.

(继承自 Installer)

事件

AfterInstall

Install(IDictionary) 属性中的所有安装程序的 Installers 方法都运行后发生。Occurs after the Install(IDictionary) methods of all the installers in the Installers property have run.

(继承自 Installer)
AfterRollback

在回滚 Installers 属性中所有安装程序的安装后发生。Occurs after the installations of all the installers in the Installers property are rolled back.

(继承自 Installer)
AfterUninstall

Installers 属性中所有安装程序都执行它们的卸载操作后发生。Occurs after all the installers in the Installers property perform their uninstallation operations.

(继承自 Installer)
BeforeInstall

在安装程序集合中每个安装程序的 Install(IDictionary) 方法运行前发生。Occurs before the Install(IDictionary) method of each installer in the installer collection has run.

(继承自 Installer)
BeforeRollback

在回滚 Installers 属性中的安装程序前发生。Occurs before the installers in the Installers property are rolled back.

(继承自 Installer)
BeforeUninstall

Installers 属性中的安装程序执行它们的卸载操作前发生。Occurs before the installers in the Installers property perform their uninstall operations.

(继承自 Installer)
Committed

Installers 属性中的所有安装程序均提交它们的安装后发生。Occurs after all the installers in the Installers property have committed their installations.

(继承自 Installer)
Committing

Installers 属性中的安装程序提交它们的安装前发生。Occurs before the installers in the Installers property commit their installations.

(继承自 Installer)
Disposed

当通过调用 Dispose() 方法释放组件时发生。Occurs when the component is disposed by a call to the Dispose() method.

(继承自 Component)

适用于