Installer.Install(IDictionary) Method

Definition

When overridden in a derived class, performs the installation.

C#
public virtual void Install(System.Collections.IDictionary stateSaver);

Parameters

stateSaver
IDictionary

An IDictionary used to save information needed to perform a commit, rollback, or uninstall operation.

Exceptions

The stateSaver parameter is null.

An exception occurred in the BeforeInstall event handler of one of the installers in the collection.

-or-

An exception occurred in the AfterInstall event handler of one of the installers in the collection.

Examples

The following example demonstrates the Install method of the Installer class. A class is derived from the Installer base class and the Install method is overridden.

C#
// Override the 'Install' method of the Installer class.
public override void Install( IDictionary mySavedState )
{
   base.Install( mySavedState );
   // Code maybe written for installation of an application.
   Console.WriteLine( "The Install method of 'MyInstallerSample' has been called" );
}

Notes to Inheritors

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also