Interface IDatasource<TUIView>
- Namespace
- GroupeIsa.Neos.Designer.UIAbstractions
- Assembly
- GroupeIsa.Neos.Designer.UIAbstractions.dll
Provides the functionalities of a data source.
public interface IDatasource<TUIView> : IList<TUIView>, ICollection<TUIView>, IEnumerable<TUIView>, IEnumerable where TUIView : class, IUIView
Type Parameters
TUIViewType of uiView.
- Inherited Members
- Extension Methods
Properties
DeletedItems
Gets the deleted items not yet saved.
IList<TUIView> DeletedItems { get; }
Property Value
- IList<TUIView>
HasMoreData
Gets a value indicating whether there is more data.
bool HasMoreData { get; }
Property Value
IsLoaded
Gets a value indicating whether the datasource has been loading.
bool IsLoaded { get; }
Property Value
Remarks
IsLoaded can be false only for datasource related to a not embedded collection.
this[int]
Gets or sets the element at the specified index.
TUIView this[int index] { get; set; }
Parameters
indexintThe zero-based index of the element to get or set.
Property Value
- TUIView
The element at the specified index.
TotalRecordCount
Gets the total record count.
int? TotalRecordCount { get; }
Property Value
- int?
Methods
AcceptChanges()
Accepts all changes. The deleted items are definitely deleted and cannot be restored. The changes made on the items are accepted.
void AcceptChanges()
AppendItems(IEnumerable<TUIView>)
Appends the specified items to the datasource, without replacing existing items.
void AppendItems(IEnumerable<TUIView> items)
Parameters
itemsIEnumerable<TUIView>Items.
AppendItems(IEnumerable<TUIView>, bool, int)
Appends the specified items to the datasource, without replacing existing items and setting the hasMoreData and totalRecordCount properties.
void AppendItems(IEnumerable<TUIView> items, bool hasMoreData, int totalRecordCount)
Parameters
itemsIEnumerable<TUIView>Items.
hasMoreDataboolValue indicating whether there is more data.
totalRecordCountintTotal record count.
Clear()
Removes all items in the datasource.
void Clear()
Move(int, params TUIView[])
Moves the specified items to the specified index.
bool Move(int newIndex, params TUIView[] items)
Parameters
newIndexintThe new index of the items.
itemsTUIView[]The items to move.
Returns
- bool
True if the items have been moved, false otherwise.
RejectChanges()
Rejects all changes. The deleted items are restored. The added items are removed. The changes made on the items are rejected.
void RejectChanges()
RemoveAll(Predicate<TUIView>)
Removes all the elements that match the conditions defined by the specified predicate.
int RemoveAll(Predicate<TUIView> predicate)
Parameters
predicatePredicate<TUIView>The predicate delegate that defines the conditions of the elements to remove.
Returns
- int
The number of elements removed from the data source.
SetItems(IEnumerable<TUIView>)
Sets the items of the datasource, replacing any existing items.
void SetItems(IEnumerable<TUIView> items)
Parameters
itemsIEnumerable<TUIView>Items.
SetItems(IEnumerable<TUIView>, bool, int)
Sets the items of the datasource, replacing any existing items and setting the hasMoreData and totalRecordCount properties.
void SetItems(IEnumerable<TUIView> items, bool hasMoreData, int totalRecordCount)
Parameters
itemsIEnumerable<TUIView>Items.
hasMoreDataboolValue indicating whether there is more data.
totalRecordCountintTotal record count.