Interface ICollectionVariable<TKey, TElement, TValidationResult>
Represents a generic collection variable.
public interface ICollectionVariable<TKey, TElement, TValidationResult> : IReadOnlyCollectionVariable<TKey, TElement, TValidationResult>, IReadOnlyCollectionVariable<TKey, TElement>, IReadOnlyCollectionVariable, IVariableNode where TKey : notnull where TElement : notnull
Type Parameters
TKeyKey type.
TElementElement type.
TValidationResultValidation result type.
- Inherited Members
- Extension Methods
Methods
Add(IEnumerable<TElement>)
Adds a collection of elements to this collection.
VariableChangeResult Add(IEnumerable<TElement> elements)
Parameters
elementsIEnumerable<TElement>Collection of elements to add.
Returns
- VariableChangeResult
Result of this change attempt.
Add(TElement)
Adds an element to this collection.
VariableChangeResult Add(TElement element)
Parameters
elementTElementElement to add.
Returns
- VariableChangeResult
Result of this change attempt.
AddOrReplace(IEnumerable<TElement>)
Adds or replaces a collection of elements in this collection.
VariableChangeResult AddOrReplace(IEnumerable<TElement> elements)
Parameters
elementsIEnumerable<TElement>Collection of elements to add or to replace with.
Returns
- VariableChangeResult
Result of this change attempt.
AddOrReplace(TElement)
Adds or replaces an element in this collection.
VariableChangeResult AddOrReplace(TElement element)
Parameters
elementTElementElement to add or to replace with.
Returns
- VariableChangeResult
Result of this change attempt.
AddOrTryReplace(IEnumerable<TElement>)
Adds or attempts to replace a collection of elements in this collection. Existing elements will not be replaced when they and their replacements are considered to be equal.
VariableChangeResult AddOrTryReplace(IEnumerable<TElement> elements)
Parameters
elementsIEnumerable<TElement>Collection of elements to add or to replace with.
Returns
- VariableChangeResult
Result of this change attempt.
AddOrTryReplace(TElement)
Adds or attempts to replace an element in this collection. Existing elements will not be replaced when they and their replacements are considered to be equal.
VariableChangeResult AddOrTryReplace(TElement element)
Parameters
elementTElementElement to add or to replace with.
Returns
- VariableChangeResult
Result of this change attempt.
Change(IEnumerable<TElement>)
Changes the Elements. Elements that exist and are considered equal are registered as replaced.
VariableChangeResult Change(IEnumerable<TElement> elements)
Parameters
elementsIEnumerable<TElement>Elements to set.
Returns
- VariableChangeResult
Result of this change attempt.
Clear()
Removes all elements from this collection.
VariableChangeResult Clear()
Returns
- VariableChangeResult
Result of this change attempt.
ClearValidation()
Removes all errors and warnings from this variable.
void ClearValidation()
ClearValidation(IEnumerable<TKey>)
Clears validation of elements associated with the provided collection keys.
void ClearValidation(IEnumerable<TKey> keys)
Parameters
keysIEnumerable<TKey>Collection of keys to refresh.
ClearValidation(TKey)
Clears validation of an element associated with the provided key.
void ClearValidation(TKey key)
Parameters
keyTKeyKey to refresh.
Refresh()
Refreshes this variable.
void Refresh()
Refresh(IEnumerable<TKey>)
Refreshes elements associated with the provided collection keys.
void Refresh(IEnumerable<TKey> keys)
Parameters
keysIEnumerable<TKey>Collection of keys to refresh.
Refresh(TKey)
Refreshes an element associated with the provided key.
void Refresh(TKey key)
Parameters
keyTKeyKey to refresh.
RefreshValidation()
Refreshes this variable's validation.
void RefreshValidation()
RefreshValidation(IEnumerable<TKey>)
Refreshes validation of elements associated with the provided collection keys.
void RefreshValidation(IEnumerable<TKey> keys)
Parameters
keysIEnumerable<TKey>Collection of keys to refresh.
RefreshValidation(TKey)
Refreshes validation of an element associated with the provided key.
void RefreshValidation(TKey key)
Parameters
keyTKeyKey to refresh.
Remove(IEnumerable<TKey>)
Removes elements associated with the provided collection of keys.
VariableChangeResult Remove(IEnumerable<TKey> keys)
Parameters
keysIEnumerable<TKey>Collection of keys to remove.
Returns
- VariableChangeResult
Result of this change attempt.
Remove(TKey)
Removes an element associated with the provided key.
VariableChangeResult Remove(TKey key)
Parameters
keyTKeyKey to remove.
Returns
- VariableChangeResult
Result of this change attempt.
Replace(IEnumerable<TElement>)
Replaces a collection of existing elements in this collection.
VariableChangeResult Replace(IEnumerable<TElement> elements)
Parameters
elementsIEnumerable<TElement>Collection of element replacements.
Returns
- VariableChangeResult
Result of this change attempt.
Replace(TElement)
Replaces an existing element in this collection.
VariableChangeResult Replace(TElement element)
Parameters
elementTElementElement's replacement.
Returns
- VariableChangeResult
Result of this change attempt.
TryChange(IEnumerable<TElement>)
Attempts to change the Elements. Elements that exist and are considered equal are registered as refreshed.
VariableChangeResult TryChange(IEnumerable<TElement> elements)
Parameters
elementsIEnumerable<TElement>Elements to set.
Returns
- VariableChangeResult
Result of this change attempt.
TryReplace(IEnumerable<TElement>)
Replaces a collection of existing elements in this collection, unless they and their replacements are considered to be equal.
VariableChangeResult TryReplace(IEnumerable<TElement> elements)
Parameters
elementsIEnumerable<TElement>Collection of element replacements.
Returns
- VariableChangeResult
Result of this change attempt.
TryReplace(TElement)
Attempts to replace an existing element in this collection, unless it and its replacement are considered to be equal.
VariableChangeResult TryReplace(TElement element)
Parameters
elementTElementElement's replacement.
Returns
- VariableChangeResult
Result of this change attempt.