C# Class WixSharp.Condition

Defines WiX Condition. Condition is normally associated with CustomActions or WiX elements (e.g. Shortcut).

Condition is nothing else but an XML friendly string wrapper, containing some predefined (commonly used) condition values. You can either use one of the predefined condition values (static members) or define your by specifying full string representation of the required WiX condition when calling the constructor or static method Create.

Inheritance: WixEntity
Show file Open project: Eun/WixSharp Class Usage Examples

Public Properties

Property Type Description
Always Condition
BeingRemoved Condition
ClrDialog_BackPressed Condition
ClrDialog_CancelPressed Condition
ClrDialog_NextPressed Condition
Installed Condition
NOT_BeingRemoved Condition
NOT_Installed Condition
NOT_Silent Condition
Net20_Installed Condition
Net30_SP_Installed Condition
Net35_Installed Condition
Net45_Installed Condition
Silent Condition
Value string

Public Methods

Method Description
Condition ( string value ) : System

Initializes a new instance of the Condition class.

Create ( string value ) : Condition

Creates WiX Condition condition from the given string value.

GetDistinctProperties ( ) : string[]

Extracts the distinct names of properties from the condition string expression.

ToCData ( ) : System.Xml.Linq.XCData

Returns the WiX Condition as a T:System.Xml.Linq.XCData. Normally Condition is not designed to be parsed by the XML parser thus it should be embedded as CDATA <Condition><![CDATA[NETFRAMEWORK20="#0"]]></Condition>

ToString ( ) : string

Returns the WiX Condition as a string.

Method Details

Condition() public method

Initializes a new instance of the Condition class.
public Condition ( string value ) : System
value string The value of the WiX condition expression.
return System

Create() public static method

Creates WiX Condition condition from the given string value.
public static Create ( string value ) : Condition
value string String value of the Condition to be created.
return Condition

GetDistinctProperties() public method

Extracts the distinct names of properties from the condition string expression.
public GetDistinctProperties ( ) : string[]
return string[]

ToCData() public method

Returns the WiX Condition as a T:System.Xml.Linq.XCData. Normally Condition is not designed to be parsed by the XML parser thus it should be embedded as CDATA <Condition><![CDATA[NETFRAMEWORK20="#0"]]></Condition>
public ToCData ( ) : System.Xml.Linq.XCData
return System.Xml.Linq.XCData

ToString() public method

Returns the WiX Condition as a string.
public ToString ( ) : string
return string

Property Details

Always public static property

String representation of "always true" condition of the WiX Condition.
public static Condition Always
return Condition

BeingRemoved public static property

String representation of the REMOVE="ALL" condition of the WiX Condition.
public static Condition BeingRemoved
return Condition

ClrDialog_BackPressed public static property

String representation of the Custom_UI_Command = "back" condition. This condition is triggered when user presses 'Back' button in the CLR Dialog.
public static Condition ClrDialog_BackPressed
return Condition

ClrDialog_CancelPressed public static property

String representation of the Custom_UI_Command = "abort" condition. This condition is triggered when user presses 'Cancel' button in the CLR Dialog.
public static Condition ClrDialog_CancelPressed
return Condition

ClrDialog_NextPressed public static property

String representation of the Custom_UI_Command = "next" condition. This condition is triggered when user presses 'Next' button in the CLR Dialog.
public static Condition ClrDialog_NextPressed
return Condition

Installed public static property

String representation of the Installed condition of the WiX Condition.
public static Condition Installed
return Condition

NOT_BeingRemoved public static property

String representation of the NOT (REMOVE="ALL") condition of the WiX Condition.
public static Condition NOT_BeingRemoved
return Condition

NOT_Installed public static property

String representation of the NOT Installed condition of the WiX Condition.
public static Condition NOT_Installed
return Condition

NOT_Silent public static property

String representation of the UILevel > 3 condition of the WiX Condition.
public static Condition NOT_Silent
return Condition

Net20_Installed public static property

The .NET2.0 installed. This condition is to be used in Project.SetNetFxPrerequisite.
public static Condition Net20_Installed
return Condition

Net30_SP_Installed public static property

The .NET3.0 SP installed. This condition is to be used in Project.SetNetFxPrerequisite.
public static Condition Net30_SP_Installed
return Condition

Net35_Installed public static property

The .NET3.5 installed. This condition is to be used in Project.SetNetFxPrerequisite.
public static Condition Net35_Installed
return Condition

Net45_Installed public static property

The .NET4.5 installed. This condition is to be used in Project.SetNetFxPrerequisite.
public static Condition Net45_Installed
return Condition

Silent public static property

String representation of the UILevel < 4 condition of the WiX Condition.
public static Condition Silent
return Condition

Value public property

String value of WiX Condition.
public string Value
return string