Skip to content

CustomActionData Class

Contains a collection of key-value pairs suitable for passing between immediate and deferred/rollback/commit custom actions.

MethodDescription
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.
PropertyDescription
CountGets the number of items in the data.
IsReadOnlyGets a value indicating whether the data is read-only.
ItemGets or sets a data value with a specified key.
KeysGets a collection object containing all the keys of the data.
ValuesGets a collection containing all the values of the data.
FieldDescription
PropertyName”CustomActionData” literal property name.

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.

  • P:WixToolset.Dtf.WindowsInstaller.Session.CustomActionData
  • M:WixToolset.Dtf.WindowsInstaller.Session.DoAction(System.String,WixToolset.Dtf.WindowsInstaller.CustomActionData) WixToolset.Dtf.WindowsInstaller.dll version 5.0.0+41e11442b2ca93e444b60213b5ae99dcbab787d8

Adds a key and value to the data collection.

public void Add(
string key,
string value
)
ParameterTypeDescription
keystringCase-sensitive data key.
valuestringData value (may be null).
ExceptionDescription
T:System.ArgumentExceptionthe key does not consist solely of letters,
numbers, and the period, underscore, and space characters. |

Removes all items from the data.

public void Clear()

Determines whether the data contains an item with the specified key.

public bool ContainsKey(
string key
)
ParameterTypeDescription
keystringCase-sensitive data key.

bool true if the data contains an item with the key; otherwise, false

Returns an enumerator that iterates through the collection.

public IEnumerator<System.Collections.Generic.KeyValuePair`2<System.String,System.String>> GetEnumerator()

IEnumerator<System.Collections.Generic.KeyValuePair2<System.String,System.String>>` An enumerator that can be used to iterate through the collection.

Removes the item with the specified key from the data.

public bool Remove(
string key
)
ParameterTypeDescription
keystringCase-sensitive data key.

bool true if the item was successfully removed from the data; false if an item with the specified key was not found

Gets a string representation of the data suitable for persisting in a property.

public string ToString()

string Data string in the form “Key1=Value1;Key2=Value2”

Gets the number of items in the data.

public int Count { get; set; }

Gets a value indicating whether the data is read-only.

public bool IsReadOnly { get; set; }

Gets or sets a data value with a specified key.

public string Item[
string key
] { get; set; }
ParameterTypeDescription
keystringCase-sensitive data key.
ExceptionDescription
T:System.ArgumentExceptionthe key does not consist solely of letters,
numbers, and the period, underscore, and space characters. |

Gets a collection object containing all the keys of the data.

public System.Collections.Generic.ICollection<System.String> Keys { get; set; }

Gets a collection containing all the values of the data.

public System.Collections.Generic.ICollection<System.String> Values { get; set; }