CustomActionData Class
Contains a collection of key-value pairs suitable for passing between immediate and deferred/rollback/commit custom actions.
Methods
Section titled “Methods”| Method | Description |
|---|---|
| Add(key, value) | Adds a key and value to the data collection. |
| Clear() | Removes all items from the data. |
| ContainsKey(key) | Determines whether the data contains an item with the specified key. |
| GetEnumerator() | Returns an enumerator that iterates through the collection. |
| Remove(key) | Removes the item with the specified key from the data. |
| ToString() | Gets a string representation of the data suitable for persisting in a property. |
Properties
Section titled “Properties”| Property | Description |
|---|---|
| Count | Gets the number of items in the data. |
| IsReadOnly | Gets a value indicating whether the data is read-only. |
| Item | Gets or sets a data value with a specified key. |
| Keys | Gets a collection object containing all the keys of the data. |
| Values | Gets a collection containing all the values of the data. |
Fields
Section titled “Fields”| Field | Description |
|---|---|
| PropertyName | ”CustomActionData” literal property name. |
Remarks
Section titled “Remarks”Call the «see M:WixToolset.Dtf.WindowsInstaller.CustomActionData.ToString» method to get a string suitable for storing in a property and reconstructing the custom action data later.
See also
Section titled “See also”- P:WixToolset.Dtf.WindowsInstaller.Session.CustomActionData
- M:WixToolset.Dtf.WindowsInstaller.Session.DoAction(System.String,WixToolset.Dtf.WindowsInstaller.CustomActionData)
WixToolset.Dtf.WindowsInstaller.dllversion5.0.0+41e11442b2ca93e444b60213b5ae99dcbab787d8
Add(key, value) Method
Section titled “Add(key, value) Method”Adds a key and value to the data collection.
Declaration
Section titled “Declaration”public void Add( string key, string value)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| key | string | Case-sensitive data key. |
| value | string | Data value (may be null). |
Exceptions
Section titled “Exceptions”| Exception | Description |
|---|---|
| T:System.ArgumentException | the key does not consist solely of letters, |
numbers, and the period, underscore, and space characters. |Clear() Method
Section titled “Clear() Method”Removes all items from the data.
Declaration
Section titled “Declaration”public void Clear()ContainsKey(key) Method
Section titled “ContainsKey(key) Method”Determines whether the data contains an item with the specified key.
Declaration
Section titled “Declaration”public bool ContainsKey( string key)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| key | string | Case-sensitive data key. |
Return value
Section titled “Return value”bool true if the data contains an item with the key; otherwise, false
GetEnumerator() Method
Section titled “GetEnumerator() Method”Returns an enumerator that iterates through the collection.
Declaration
Section titled “Declaration”public IEnumerator<System.Collections.Generic.KeyValuePair`2<System.String,System.String>> GetEnumerator()Return value
Section titled “Return value”IEnumerator<System.Collections.Generic.KeyValuePair2<System.String,System.String>>` An enumerator that can be used to iterate through the collection.
Remove(key) Method
Section titled “Remove(key) Method”Removes the item with the specified key from the data.
Declaration
Section titled “Declaration”public bool Remove( string key)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| key | string | Case-sensitive data key. |
Return value
Section titled “Return value”bool true if the item was successfully removed from the data; false if an item with the specified key was not found
ToString() Method
Section titled “ToString() Method”Gets a string representation of the data suitable for persisting in a property.
Declaration
Section titled “Declaration”public string ToString()Return value
Section titled “Return value”string Data string in the form “Key1=Value1;Key2=Value2”
Count Property
Section titled “Count Property”Gets the number of items in the data.
Declaration
Section titled “Declaration”public int Count { get; set; }IsReadOnly Property
Section titled “IsReadOnly Property”Gets a value indicating whether the data is read-only.
Declaration
Section titled “Declaration”public bool IsReadOnly { get; set; }Item Property
Section titled “Item Property”Gets or sets a data value with a specified key.
Declaration
Section titled “Declaration”public string Item[ string key] { get; set; }Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
| key | string | Case-sensitive data key. |
Exceptions
Section titled “Exceptions”| Exception | Description |
|---|---|
| T:System.ArgumentException | the key does not consist solely of letters, |
numbers, and the period, underscore, and space characters. |Keys Property
Section titled “Keys Property”Gets a collection object containing all the keys of the data.
Declaration
Section titled “Declaration”public System.Collections.Generic.ICollection<System.String> Keys { get; set; }Values Property
Section titled “Values Property”Gets a collection containing all the values of the data.
Declaration
Section titled “Declaration”public System.Collections.Generic.ICollection<System.String> Values { get; set; }