Class ContentItemDataEventContainer
- Namespace
- CMS.ContentEngine
- Assembly
- CMS.ContentEngine.dll
Data container with type-specific content item data used in content item events.
public sealed class ContentItemDataEventContainer
- Inheritance
-
objectContentItemDataEventContainer
- Extension Methods
Constructors
ContentItemDataEventContainer(Func<string, (bool Exists, object Value)>)
Initializes instance of ContentItemDataEventContainer class.
public ContentItemDataEventContainer(Func<string, (bool Exists, object Value)> dataRetriever)
Parameters
dataRetriever
Func<string, (bool Exists, object Value)>
Methods
TryGetValue<T>(string, out T)
Tries to get value of given key from the content item data.
public bool TryGetValue<T>(string key, out T value)
Parameters
key
stringKey of stored value.
value
TValue stored under given key.
Returns
- bool
True if the key is ContentItemDataEventContainer, false otherwise.
Type Parameters
T
Exceptions
- ArgumentNullException
Thrown if
key
is null.- InvalidCastException
Thrown if type of value stored in data cannot be cast to the type of
value
.