C# 클래스 WixSharp.ManagedAction

Defines WiX Managed CustomAction.

Managed CustomAction can be defined either in the Wix# script or in the external assembly or C# file. The only requirements for any C# method to be qualified for being Managed CustomAcyion is to have DTF Action signature public static ActionResult MyManagedAction(Session session), and be marked with [CustomAction] attribute.

If Managed CustomAction depends on any assembly, which will not be registered with GAC on the target system such assembly needs to be listed in the ManagedAction.RefAssemblies.

ManagedAction often needs to be executed with the elevated privileges. Thus after instantiation it will have Action.Impersonate set to false and Action.Execute set to Execute.deferred to allow elevating.
상속: Action
파일 보기 프로젝트 열기: Eun/WixSharp 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
ActionAssembly string
DefaultUsesProperties string
MethodName string
RefAssemblies string[]
UsesProperties string

공개 메소드들

메소드 설명
ManagedAction ( ) : System

Initializes a new instance of the ManagedAction class.

ManagedAction ( Id id, string name ) : System

Initializes a new instance of the ManagedAction class with properties/fields initialized with specified parameters.

ManagedAction ( Id id, string name, Return returnType, When when, Step step, Condition condition ) : System

Initializes a new instance of the ManagedAction class with properties/fields initialized with specified parameters.

ManagedAction ( Id id, string name, Return returnType, When when, Step step, Condition condition, WixSharp.Sequence sequence ) : System

Initializes a new instance of the ManagedAction class with properties/fields initialized with specified parameters.

ManagedAction ( Id id, string name, string actionAssembly ) : System

Initializes a new instance of the ManagedAction class with properties/fields initialized with specified parameters.

ManagedAction ( Id id, string name, string actionAssembly, Return returnType, When when, Step step, Condition condition ) : System

Initializes a new instance of the ManagedAction class with properties/fields initialized with specified parameters.

ManagedAction ( Id id, string name, string actionAssembly, Return returnType, When when, Step step, Condition condition, WixSharp.Sequence sequence ) : System

Initializes a new instance of the ManagedAction class with properties/fields initialized with specified parameters.

ManagedAction ( string name ) : System

Initializes a new instance of the ManagedAction class with properties/fields initialized with specified parameters.

ManagedAction ( string name, Return returnType, When when, Step step, Condition condition ) : System

Initializes a new instance of the ManagedAction class with properties/fields initialized with specified parameters.

ManagedAction ( string name, Return returnType, When when, Step step, Condition condition, WixSharp.Sequence sequence ) : System

Initializes a new instance of the ManagedAction class with properties/fields initialized with specified parameters.

ManagedAction ( string name, string actionAssembly ) : System

Initializes a new instance of the ManagedAction class with properties/fields initialized with specified parameters.

ManagedAction ( string name, string actionAssembly, Return returnType, When when, Step step, Condition condition ) : System

Initializes a new instance of the ManagedAction class with properties/fields initialized with specified parameters.

ManagedAction ( string name, string actionAssembly, Return returnType, When when, Step step, Condition condition, WixSharp.Sequence sequence ) : System

Initializes a new instance of the ManagedAction class with properties/fields initialized with specified parameters.

비공개 메소드들

메소드 설명
ExpandAllUsedProperties ( ) : string
GetRefAssembliesHashCode ( IEnumerable defaultAssemblies ) : int

메소드 상세

ManagedAction() 공개 메소드

Initializes a new instance of the ManagedAction class.
public ManagedAction ( ) : System
리턴 System

ManagedAction() 공개 메소드

Initializes a new instance of the ManagedAction class with properties/fields initialized with specified parameters.
public ManagedAction ( Id id, string name ) : System
id Id The explicit to be associated with instance.
name string Name of the CustomAction. The name should match the method implementing the custom action functionality.
리턴 System

ManagedAction() 공개 메소드

Initializes a new instance of the ManagedAction class with properties/fields initialized with specified parameters.
public ManagedAction ( Id id, string name, Return returnType, When when, Step step, Condition condition ) : System
id Id The explicit to be associated with instance.
name string Name of the CustomAction. The name should match the method implementing the custom action functionality.
returnType Return The return type of the action.
when When the action should be executed with respect to the parameter.
step Step the action should be executed before/after during the installation.
condition Condition The launch condition for the .
리턴 System

ManagedAction() 공개 메소드

Initializes a new instance of the ManagedAction class with properties/fields initialized with specified parameters.
public ManagedAction ( Id id, string name, Return returnType, When when, Step step, Condition condition, WixSharp.Sequence sequence ) : System
id Id The explicit to be associated with instance.
name string Name of the CustomAction. The name should match the method implementing the custom action functionality.
returnType Return The return type of the action.
when When the action should be executed with respect to the parameter.
step Step the action should be executed before/after during the installation.
condition Condition The launch condition for the .
sequence WixSharp.Sequence The MSI sequence the action belongs to.
리턴 System

ManagedAction() 공개 메소드

Initializes a new instance of the ManagedAction class with properties/fields initialized with specified parameters.
public ManagedAction ( Id id, string name, string actionAssembly ) : System
id Id The explicit to be associated with instance.
name string Name of the CustomAction. The name should match the method implementing the custom action functionality.
actionAssembly string Path to the assembly containing the CustomAction implementation. Specify "%this%" if the assembly /// is in the Wix# script.
리턴 System

ManagedAction() 공개 메소드

Initializes a new instance of the ManagedAction class with properties/fields initialized with specified parameters.
public ManagedAction ( Id id, string name, string actionAssembly, Return returnType, When when, Step step, Condition condition ) : System
id Id The explicit to be associated with instance.
name string Name of the CustomAction. The name should match the method implementing the custom action functionality.
actionAssembly string Path to the assembly containing the CustomAction implementation. Specify "%this%" if the assembly /// is in the Wix# script.
returnType Return The return type of the action.
when When the action should be executed with respect to the parameter.
step Step the action should be executed before/after during the installation.
condition Condition The launch condition for the .
리턴 System

ManagedAction() 공개 메소드

Initializes a new instance of the ManagedAction class with properties/fields initialized with specified parameters.
public ManagedAction ( Id id, string name, string actionAssembly, Return returnType, When when, Step step, Condition condition, WixSharp.Sequence sequence ) : System
id Id The explicit to be associated with instance.
name string Name of the CustomAction. The name should match the method implementing the custom action functionality.
actionAssembly string Path to the assembly containing the CustomAction implementation. Specify "%this%" if the assembly /// is in the Wix# script.
returnType Return The return type of the action.
when When the action should be executed with respect to the parameter.
step Step the action should be executed before/after during the installation.
condition Condition The launch condition for the .
sequence WixSharp.Sequence The MSI sequence the action belongs to.
리턴 System

ManagedAction() 공개 메소드

Initializes a new instance of the ManagedAction class with properties/fields initialized with specified parameters.
public ManagedAction ( string name ) : System
name string Name of the CustomAction. The name should match the method implementing the custom action functionality.
리턴 System

ManagedAction() 공개 메소드

Initializes a new instance of the ManagedAction class with properties/fields initialized with specified parameters.
public ManagedAction ( string name, Return returnType, When when, Step step, Condition condition ) : System
name string Name of the CustomAction. The name should match the method implementing the custom action functionality.
returnType Return The return type of the action.
when When the action should be executed with respect to the parameter.
step Step the action should be executed before/after during the installation.
condition Condition The launch condition for the .
리턴 System

ManagedAction() 공개 메소드

Initializes a new instance of the ManagedAction class with properties/fields initialized with specified parameters.
public ManagedAction ( string name, Return returnType, When when, Step step, Condition condition, WixSharp.Sequence sequence ) : System
name string Name of the CustomAction. The name should match the method implementing the custom action functionality.
returnType Return The return type of the action.
when When the action should be executed with respect to the parameter.
step Step the action should be executed before/after during the installation.
condition Condition The launch condition for the .
sequence WixSharp.Sequence The MSI sequence the action belongs to.
리턴 System

ManagedAction() 공개 메소드

Initializes a new instance of the ManagedAction class with properties/fields initialized with specified parameters.
public ManagedAction ( string name, string actionAssembly ) : System
name string Name of the CustomAction. The name should match the method implementing the custom action functionality.
actionAssembly string Path to the assembly containing the CustomAction implementation. Specify "%this%" if the assembly /// is in the Wix# script.
리턴 System

ManagedAction() 공개 메소드

Initializes a new instance of the ManagedAction class with properties/fields initialized with specified parameters.
public ManagedAction ( string name, string actionAssembly, Return returnType, When when, Step step, Condition condition ) : System
name string Name of the CustomAction. The name should match the method implementing the custom action functionality.
actionAssembly string Path to the assembly containing the CustomAction implementation. Specify "%this%" if the assembly /// is in the Wix# script.
returnType Return The return type of the action.
when When the action should be executed with respect to the parameter.
step Step the action should be executed before/after during the installation.
condition Condition The launch condition for the .
리턴 System

ManagedAction() 공개 메소드

Initializes a new instance of the ManagedAction class with properties/fields initialized with specified parameters.
public ManagedAction ( string name, string actionAssembly, Return returnType, When when, Step step, Condition condition, WixSharp.Sequence sequence ) : System
name string Name of the CustomAction. The name should match the method implementing the custom action functionality.
actionAssembly string Path to the assembly containing the CustomAction implementation. Specify "%this%" if the assembly /// is in the Wix# script.
returnType Return The return type of the action.
when When the action should be executed with respect to the parameter.
step Step the action should be executed before/after during the installation.
condition Condition The launch condition for the .
sequence WixSharp.Sequence The MSI sequence the action belongs to.
리턴 System

프로퍼티 상세

ActionAssembly 공개적으로 프로퍼티

Path to the assembly containing the CustomAction implementation. Specify "%this%" if the assembly is in the Wix# script.

Default value is %this%.

public string ActionAssembly
리턴 string

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

The default properties mapped for use with the deferred custom actions. See ManagedAction.UsesProperties for the details.

The default value is "INSTALLDIR,UILevel"

public static string DefaultUsesProperties
리턴 string

MethodName 공개적으로 프로퍼티

Name of the method implementing the Managed CustomAction action functionality.
public string MethodName
리턴 string

RefAssemblies 공개적으로 프로퍼티

Collection of path strings for dependency assemblies to be included in MSI. RefAssemblies should be used if the Managed CustomAction depends on any assembly, which will not be registered with GAC on the target system.
public string[] RefAssemblies
리턴 string[]

UsesProperties 공개적으로 프로퍼티

Comma separated list of properties which the custom action is intended to use. Set this property if you are implementing the deferred action.

Deferred custom actions cannot access any session property as the session is terminated at the time of the action execution (limitation of MSI). The standard way of overcoming this limitation is to create a new custom action for setting the property, set the property name to the name of the deferred action, set the property value to the specially formatted map, schedule the execution of the custom action and access the mapped properties only via T:Microsoft.Deployment.WindowsInstaller.Session.CustomActionData.

All this can be done in a single hit with Wix# as it fully automates creation of the all mapping infrastructure.

Note that you don't even have to specify UsesProperties = "INSTALLDIR" as by default Wix# always maps INSTALLDIR and UILevel for all deferred managed actions. The default mapping is controlled by ManagedAction.DefaultUsesProperties.

It is also possible to map the 'deferred' properties in the typical WiX way:

UsesProperties = "CONFIG_FILE=[INSTALLDIR]MyApp.exe.config, APP_FILE=[INSTALLDIR]MyApp.exe"
public string UsesProperties
리턴 string