C# 클래스 WixSharp.UI.MsiSession

Generic class that represents runtime properties of the MSI setup session as well as some runtime properties of the product being installed (e.g. CodePage, Caption). It also Simplifies MSI execution and provides automatic responses on the MSI Messages.

Normally MsiSession should be extended top meet the needs of the product (MSI) specific setup.

상속: INotifyPropertyChanged
파일 보기 프로젝트 열기: Eun/WixSharp 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
InUiThread System.Action
ProgressStepDelay int

공개 메소드들

메소드 설명
EnableLog ( string logFile, MsiInstallLogMode mode = MsiInstallLogMode.Info|MsiInstallLogMode.Progress|MsiInstallLogMode.PropertyDump|MsiInstallLogMode.Error|MsiInstallLogMode.User|MsiInstallLogMode.ActionData ) : void

Enables the MSI runtime logging to the specified log file.

Execute ( string msiFile, string msiParams ) : void

Executes the MSI file with the specified MSI parameters.

ExecuteInstall ( string msiFile, string msiParams = null ) : void

Executes the install sequence from the specified MSI file.

ExecuteUninstall ( string msiFile, string msiParams = null ) : void

Executes the uninstall sequence from the specified MSI file.

NotifyHostOnActionStarted ( ) : void
NotifyHostOnProgress ( ) : void
OnActionData ( string data ) : void

Called when ActionData MSI message is received.

OnError ( string data, bool fatal, MsiInstallMessage relatedMessageType = null ) : void

Called when Error event occurs (MSI Error message is received or an internal error condition triggered).

OnInfo ( string data ) : void

Called when Info MSI message is received.

OnUser ( string data ) : void

Called when User MSI message is received.

OnWarning ( string data ) : void

Called when Warning MSI message is received.

보호된 메소드들

메소드 설명
OnMessage ( string message, MsiInstallMessage messageType ) : int

Called when MSI message is received. It is actual the MSI Message Loop.

OnPropertyChanged ( string propertyName ) : void

비공개 메소드들

메소드 설명
OnExternalUI ( IntPtr context, uint messageType, string message ) : int

메소드 상세

EnableLog() 공개 메소드

Enables the MSI runtime logging to the specified log file.
public EnableLog ( string logFile, MsiInstallLogMode mode = MsiInstallLogMode.Info|MsiInstallLogMode.Progress|MsiInstallLogMode.PropertyDump|MsiInstallLogMode.Error|MsiInstallLogMode.User|MsiInstallLogMode.ActionData ) : void
logFile string The log file.
mode MsiInstallLogMode The logging mode.
리턴 void

Execute() 공개 메소드

Executes the MSI file with the specified MSI parameters.
public Execute ( string msiFile, string msiParams ) : void
msiFile string The MSI file.
msiParams string The MSI parameters.
리턴 void

ExecuteInstall() 공개 메소드

Executes the install sequence from the specified MSI file.
public ExecuteInstall ( string msiFile, string msiParams = null ) : void
msiFile string The MSI file.
msiParams string The MSI params.
리턴 void

ExecuteUninstall() 공개 메소드

Executes the uninstall sequence from the specified MSI file.
public ExecuteUninstall ( string msiFile, string msiParams = null ) : void
msiFile string The MSI file.
msiParams string The MSI params.
리턴 void

NotifyHostOnActionStarted() 공개 메소드

public NotifyHostOnActionStarted ( ) : void
리턴 void

NotifyHostOnProgress() 공개 메소드

public NotifyHostOnProgress ( ) : void
리턴 void

OnActionData() 공개 메소드

Called when ActionData MSI message is received.
public OnActionData ( string data ) : void
data string The message data.
리턴 void

OnError() 공개 메소드

Called when Error event occurs (MSI Error message is received or an internal error condition triggered).
public OnError ( string data, bool fatal, MsiInstallMessage relatedMessageType = null ) : void
data string The message data.
fatal bool if set to true the error is fatal.
relatedMessageType MsiInstallMessage Type of the related message. Note the error may be associated with the internal /// error condition (e.g. exception is raised).
리턴 void

OnInfo() 공개 메소드

Called when Info MSI message is received.
public OnInfo ( string data ) : void
data string The message data.
리턴 void

OnMessage() 보호된 메소드

Called when MSI message is received. It is actual the MSI Message Loop.
protected OnMessage ( string message, MsiInstallMessage messageType ) : int
message string The message data.
messageType MsiInstallMessage Type of the message.
리턴 int

OnPropertyChanged() 보호된 메소드

protected OnPropertyChanged ( string propertyName ) : void
propertyName string
리턴 void

OnUser() 공개 메소드

Called when User MSI message is received.
public OnUser ( string data ) : void
data string The message data.
리턴 void

OnWarning() 공개 메소드

Called when Warning MSI message is received.
public OnWarning ( string data ) : void
data string The message data.
리턴 void

프로퍼티 상세

InUiThread 공개적으로 프로퍼티

The UI thread marshalling delegate. It should be set for the environments where cross-thread calls must be marshalled (e.g. WPF, WinForms). Not needed otherwise (e.g. Console application).
public System.Action InUiThread
리턴 System.Action

ProgressStepDelay 공개적으로 정적으로 프로퍼티

The progress step delay. It is a "for-testing" feature. Set it to positive value (number of milliseconds) to artificially slow down the installation process. The default value is 0.
public static int ProgressStepDelay
리턴 int