FeatureInfo Class
Provides access to information about a feature within the context of an installation session.
Methods
Section titled “Methods”| Method | Description |
|---|---|
| GetCost(includeParents, includeChildren, installState) | Calculates the disk space required by the feature and its selected children and parent features. |
Properties
Section titled “Properties”| Property | Description |
|---|---|
| Attributes | Gets or sets the attributes of the feature. |
| CurrentState | Gets the current install state of the feature. |
| Description | Gets the description of the feature. |
| Name | Gets the name of the feature (primary key in the Feature table). |
| RequestState | Gets or sets the action state of the feature. |
| Title | Gets the title of the feature. |
| ValidStates | Gets 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.
Declaration
Section titled “Declaration”public System.Int64 GetCost( bool includeParents, bool includeChildren, InstallState installState)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| includeParents | bool | If true, the parent features are included in the cost. |
| includeChildren | bool | If true, the child features are included in the cost. |
| installState | InstallState | Specifies the installation state. |
Return value
Section titled “Return value”System.Int64 The disk space requirement in bytes.
Remarks
Section titled “Remarks”Win32 MSI API: MsiGetFeatureCost
Attributes Property
Section titled “Attributes Property”Gets or sets the attributes of the feature.
Declaration
Section titled “Declaration”public FeatureAttributes Attributes { get; set; }Remarks
Section titled “Remarks”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.
Exceptions
Section titled “Exceptions”| Exception | Description |
|---|---|
| T:WixToolset.Dtf.WindowsInstaller.InvalidHandleException | the Session handle is invalid |
| T:System.ArgumentException | an unknown feature was requested |
CurrentState Property
Section titled “CurrentState Property”Gets the current install state of the feature.
Declaration
Section titled “Declaration”public InstallState CurrentState { get; set; }Remarks
Section titled “Remarks”Win32 MSI API: MsiGetFeatureState
Exceptions
Section titled “Exceptions”| Exception | Description |
|---|---|
| T:WixToolset.Dtf.WindowsInstaller.InvalidHandleException | the Session handle is invalid |
| T:System.ArgumentException | an unknown feature was requested |
Description Property
Section titled “Description Property”Gets the description of the feature.
Declaration
Section titled “Declaration”public string Description { get; set; }Remarks
Section titled “Remarks”Win32 MSI API: MsiGetFeatureInfo
Exceptions
Section titled “Exceptions”| Exception | Description |
|---|---|
| T:WixToolset.Dtf.WindowsInstaller.InvalidHandleException | the Session handle is invalid |
| T:System.ArgumentException | an unknown feature was requested |
Name Property
Section titled “Name Property”Gets the name of the feature (primary key in the Feature table).
Declaration
Section titled “Declaration”public string Name { get; set; }RequestState Property
Section titled “RequestState Property”Gets or sets the action state of the feature.
Declaration
Section titled “Declaration”public InstallState RequestState { get; set; }Remarks
Section titled “Remarks”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
Exceptions
Section titled “Exceptions”| Exception | Description |
|---|---|
| T:WixToolset.Dtf.WindowsInstaller.InvalidHandleException | the Session handle is invalid |
| T:System.ArgumentException | an unknown feature was requested |
Title Property
Section titled “Title Property”Gets the title of the feature.
Declaration
Section titled “Declaration”public string Title { get; set; }Remarks
Section titled “Remarks”Win32 MSI API: MsiGetFeatureInfo
Exceptions
Section titled “Exceptions”| Exception | Description |
|---|---|
| T:WixToolset.Dtf.WindowsInstaller.InvalidHandleException | the Session handle is invalid |
| T:System.ArgumentException | an unknown feature was requested |
ValidStates Property
Section titled “ValidStates Property”Gets a list of valid installation states for the feature.
Declaration
Section titled “Declaration”public System.Collections.Generic.ICollection<WixToolset.Dtf.WindowsInstaller.InstallState> ValidStates { get; set; }Remarks
Section titled “Remarks”Win32 MSI API: MsiGetFeatureValidStates
Exceptions
Section titled “Exceptions”| Exception | Description |
|---|---|
| T:WixToolset.Dtf.WindowsInstaller.InvalidHandleException | the Session handle is invalid |
| T:System.ArgumentException | an unknown feature was requested |