ProtoFlux:AddKey
More actions
The AddKey node takes in one of SyncRefDictionary, SyncFieldDictionary, or SyncTypeDictionary, then a key and a value, then attempts to add the KeyValuePair into the dictionary.
Known compatible types: SyncRefDictionary, SyncFieldDictionary, and SyncTypeDictionary.
Known incompatible types: IList and its subtypes (see Add (Collections) instead).
Acquiring This Node

When browsing to the AddKey node in the ProtoFlux Browser, there are 4 options. Which you choose is up to the dictionaries key and value types. Regardless of which you choose, there are 3 fields: TDictionary, TKey, and TValue. TDictionary takes the full type of the dictionary (e.g. SyncFieldDictionary<string,int>). TKey takes the type for the key (e.g. string). TValue takes the type for the value (e.g. int).
This node can safely be type converted when connecting an input while none of the Dictionary, Key, or Value inputs are connected.
Inputs
* (Call)
Calls an impulse to add a KeyValuePair into the Dictionary.
Dictionary (SyncRefDictionary)
The Dictionary to add the KeyValuePair to.
Key (Generic)
The unique key the value can be accessed with.
Value (Generic)
The value that will be paired with the key.
Outputs
OnAdded (Continuation)
Fires if the key provided was not present in the dictionary and the key value pair has successfully been added to the dictionary.
OnAlreadyExists (Continuation)
Fires if the key provided is already present in the dictionary.
To guarantee that a key exists and is set to a particular value, chain this continuation into a SetKey node.
OnFail (Continuation)
Fires if unable to add the KeyValuePair to the Dictionary.