Skip to content

FeatureInfo Class

Provides access to information about a feature within the context of an installation session.

MethodDescription
GetCost(includeParents, includeChildren, installState)Calculates the disk space required by the feature and its selected children and parent features.
PropertyDescription
AttributesGets or sets the attributes of the feature.
CurrentStateGets the current install state of the feature.
DescriptionGets the description of the feature.
NameGets the name of the feature (primary key in the Feature table).
RequestStateGets or sets the action state of the feature.
TitleGets the title of the feature.
ValidStatesGets a list of valid installation states for the feature.
WixToolset.Dtf.WindowsInstaller.dll version 5.0.0+41e11442b2ca93e444b60213b5ae99dcbab787d8

GetCost(includeParents, includeChildren, installState) Method

Section titled “GetCost(includeParents, includeChildren, installState) Method”

Calculates the disk space required by the feature and its selected children and parent features.

public System.Int64 GetCost(
bool includeParents,
bool includeChildren,
InstallState installState
)
ParameterTypeDescription
includeParentsboolIf true, the parent features are included in the cost.
includeChildrenboolIf true, the child features are included in the cost.
installStateInstallStateSpecifies the installation state.

System.Int64 The disk space requirement in bytes.

Win32 MSI API: MsiGetFeatureCost

Gets or sets the attributes of the feature.

public FeatureAttributes Attributes { get; set; }

Win32 MSI APIs: MsiGetFeatureInfo , MsiSetFeatureAttributes Since the lpAttributes paramter of MsiGetFeatureInfo does not contain an equivalent flag for «see F:WixToolset.Dtf.WindowsInstaller.FeatureAttributes.UIDisallowAbsent» , this flag will not be retrieved. Since the dwAttributes parameter of MsiSetFeatureAttributes does not contain an equivalent flag for «see F:WixToolset.Dtf.WindowsInstaller.FeatureAttributes.UIDisallowAbsent» , the presence of this flag will be ignored.

ExceptionDescription
T:WixToolset.Dtf.WindowsInstaller.InvalidHandleExceptionthe Session handle is invalid
T:System.ArgumentExceptionan unknown feature was requested

Gets the current install state of the feature.

public InstallState CurrentState { get; set; }

Win32 MSI API: MsiGetFeatureState

ExceptionDescription
T:WixToolset.Dtf.WindowsInstaller.InvalidHandleExceptionthe Session handle is invalid
T:System.ArgumentExceptionan unknown feature was requested

Gets the description of the feature.

public string Description { get; set; }

Win32 MSI API: MsiGetFeatureInfo

ExceptionDescription
T:WixToolset.Dtf.WindowsInstaller.InvalidHandleExceptionthe Session handle is invalid
T:System.ArgumentExceptionan unknown feature was requested

Gets the name of the feature (primary key in the Feature table).

public string Name { get; set; }

Gets or sets the action state of the feature.

public InstallState RequestState { get; set; }

When changing the feature action, the action state of all the Components linked to the changed Feature records are also updated appropriately, based on the new feature Select state. All Features can be configured at once by specifying the keyword ALL instead of a specific feature name. Win32 MSI APIs: MsiGetFeatureState , MsiSetFeatureState

ExceptionDescription
T:WixToolset.Dtf.WindowsInstaller.InvalidHandleExceptionthe Session handle is invalid
T:System.ArgumentExceptionan unknown feature was requested

Gets the title of the feature.

public string Title { get; set; }

Win32 MSI API: MsiGetFeatureInfo

ExceptionDescription
T:WixToolset.Dtf.WindowsInstaller.InvalidHandleExceptionthe Session handle is invalid
T:System.ArgumentExceptionan unknown feature was requested

Gets a list of valid installation states for the feature.

public System.Collections.Generic.ICollection<WixToolset.Dtf.WindowsInstaller.InstallState> ValidStates { get; set; }

Win32 MSI API: MsiGetFeatureValidStates

ExceptionDescription
T:WixToolset.Dtf.WindowsInstaller.InvalidHandleExceptionthe Session handle is invalid
T:System.ArgumentExceptionan unknown feature was requested