Interface IAdditionalDataInitializer<TEntityView>
- Namespace
- GroupeIsa.Neos.Application.Persistence
- Assembly
- GroupeIsa.Neos.Application.Abstractions.dll
Provides a way to initialize additional data on an entity view.
public interface IAdditionalDataInitializer<in TEntityView> where TEntityView : IEntityView
Type Parameters
TEntityViewEntity view type.
Methods
SetDisplayValue(TEntityView, string, object?)
Sets a display value on a specified property of the entity view. If the display value cannot be set, an InvalidOperationException is thrown.
void SetDisplayValue(TEntityView item, string propertyName, object? displayValue)
Parameters
itemTEntityViewThe entity view item on which the display value is to be set.
propertyNamestringThe name of the property on which the display value is to be set.
displayValueobjectThe display value to be set on the specified property.
Exceptions
- InvalidOperationException
Thrown when the display value cannot be set on the specified property.
TrySetDisplayValue(TEntityView, string, object?)
Tries to set a display value on a given property.
bool TrySetDisplayValue(TEntityView item, string propertyName, object? displayValue)
Parameters
itemTEntityViewThe entity view item on which the display value is to be set.
propertyNamestringThe name of the property on which the display value is to be set.
displayValueobjectThe display value to be set on the specified property.
Returns
- bool
True if the display value was successfully initialized, false otherwise.