Click or drag to resize
EntityViewBaseTEntity Class
Generic entity view base class, which provides the core class code for the EntityView class. EntityView provides 'view' capabilities for an entity collection. This class supports filtering and sorting in-memory, using type safe objects. Binding an entity collection to a grid or other complex databinding control will actually make the control bind to an instance of this class.
Inheritance Hierarchy

Namespace:  SD.LLBLGen.Pro.ORMSupportClasses
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.2.0.0 (5.2.17.0403)
Syntax
[ListBindableAttribute(BindableSupport.Yes)]
public abstract class EntityViewBase<TEntity> : MarshalByValueComponent, 
	IRaiseItemChangedEvents, IBindingListView, IBindingList, IList, ICollection, 
	IEnumerable, ITypedList, IEntityViewCore, IEnumerable<TEntity>
where TEntity : class, IEntityCore

Type Parameters

TEntity

The EntityViewBaseTEntity type exposes the following members.

Constructors
  NameDescription
Protected methodEntityViewBaseTEntity
Initializes a new instance of the EntityViewBaseTEntity class
Top
Properties
  NameDescription
Public propertyAllowEdit
Gets / sets whether you can update items in the list.
Public propertyAllowNew
Gets/sets whether you can add items to the list using AddNew.
Public propertyAllowRemove
Gets whether you can remove items from the list, using Remove(Object) or RemoveAt(Int32).
Public propertyContainer
Gets the container for the component.
(Inherited from MarshalByValueComponent.)
Public propertyCount
Gets the number of elements contained in the ICollection.
Public propertyDataChangeAction
Gets or sets the data change action which specifies what to do when the data in the related collection of an entity view changes. A change in data can be: entity added or changed. If an entity is removed from the underlying collection, the entity is simply removed from the entity view, as the view doesn't contain any data by itself.
Public propertyDesignMode
Gets a value indicating whether the component is currently in design mode.
(Inherited from MarshalByValueComponent.)
Protected propertyEntityIndices
Gets the entity indices for the entities which are in this view, in the order sorted by the sorter set.
Protected propertyEvents
Gets the list of event handlers that are attached to this component.
(Inherited from MarshalByValueComponent.)
Public propertyFilter
Gets or sets the filter to use for this entity view.
Public propertyIsSorted
Gets whether the items in the list are sorted.
Public propertyItem
Gets the element at the specified index in this view.
Public propertyRaisesItemChangedEvents
Gets a value indicating whether the IRaiseItemChangedEvents object raises ListChanged events.
Protected propertyRelatedCollectionInternal
Gets the related collection using a property which is solely for internal usage. This is then used by the derived classes to expose the collection in a more typed manner.
Public propertySite
Gets or sets the site of the component.
(Inherited from MarshalByValueComponent.)
Public propertySortDirection
IBindingList member. Gets the direction of the sort. This property returns the value of the first SortClause in the set sorter.
Public propertySorter
Gets or sets the sorter for this entity view. Setting this property will re-sort the view and will reset the view in databinding scenario's.
Public propertySortProperty
Gets the PropertyDescriptor that is being used for sorting.
Top
Methods
  NameDescription
Protected methodAddNew
Adds a new entity through databinding.
Protected methodApplySort(ListSortDescriptionCollection)
Sorts the data source based on the given ListSortDescriptionCollection.
Protected methodApplySort(PropertyDescriptor, ListSortDirection)
Sorts the list based on a PropertyDescriptor and a ListSortDirection.
Public methodContains
Determines whether this entity view contains the entity passed in. This method returns false if the entity is outside the filter, but in the related entity collection, as it's then not contained in the entity view.
Public methodCopyTo
Copies the elements of the ICollection to an Array, starting at a particular Array index.
Protected methodCreateDummyInstance
Creates a dummy instance for the related entity collection of this view. This is done using the entityfactory of that entitycollection.
Protected methodCreateProjection
Creates a projection of the current view data, using the passed in field projections and the projector.
Public methodDispose
Releases all resources used by the MarshalByValueComponent.
(Inherited from MarshalByValueComponent.)
Protected methodDispose(Boolean)
Releases the unmanaged resources used by the MarshalByValueComponent and optionally releases the managed resources.
(Overrides MarshalByValueComponentDispose(Boolean).)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize (Inherited from MarshalByValueComponent.)
Protected methodFind
Returns the index of the row that has the given PropertyDescriptor.
Protected methodGetEntityAtIndex
Gets the entity at the specofied index in the view.
Protected methodGetEntityFieldPropertyDescriptors
Gets the entity field property descriptors for the dummy instance passed in.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetItemProperties
Returns the PropertyDescriptorCollection that represents the properties on each item used to bind data.
Public methodGetListName
Returns the name of the list.
Public methodGetPropertyDescriptors
Gets the property descriptors for the entity passed in. This is a dummy instance, and used to produce the property descriptors.
Public methodGetService
Gets the implementer of the IServiceProvider.
(Inherited from MarshalByValueComponent.)
Protected methodGetSortProperty
Gets the property descriptor for the first sortclause.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIndexOf
Determines the index of the entity passed in in the entity view in filtered and sorted state.
Protected methodInitClassCore
Inits the class.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnListChanged
Called when something changes in the related list or this view.
Public methodRefresh
Refreshes this view by re-applying filter and sorter on the related collection
Protected methodRemove
Removes the specified entity from the related collection, if the entity is in the view.
Protected methodRemoveAt
Removes the item at the specified index in this view from the related collection
Protected methodRemoveSort
Removes any sort applied using ApplySort(PropertyDescriptor, ListSortDirection).
Protected methodSetFilter
Applies the filter specified to the set related collection
Protected methodSetSorter
Sets the sort expression for the filtered entities in this view. It sorts the entities which are in this view,
Public methodToString
Returns a String containing the name of the Component, if any. This method should not be overridden.
(Inherited from MarshalByValueComponent.)
Top
Events
  NameDescription
Public eventDisposed
Adds an event handler to listen to the Disposed event on the component.
(Inherited from MarshalByValueComponent.)
Public eventListChanged
Event which is fired when the entity collection related to this entityview is changed.
Top
Explicit Interface Implementations
  NameDescription
Explicit interface implementationPrivate methodIListAdd
Not supported. Use AddNew() or add a new object to the related entity collection.
Explicit interface implementationPrivate methodIBindingListAddIndex
Adds the PropertyDescriptor to the indexes used for searching.
Explicit interface implementationPrivate methodIBindingListAddNew
Adds a new item to the list.
Explicit interface implementationPrivate propertyIBindingListAllowEdit
Gets whether you can update items in the list.
Explicit interface implementationPrivate propertyIBindingListAllowNew
Explicit interface implementationPrivate propertyIBindingListAllowRemove
Gets whether you can remove items from the list, using Remove(Object) or RemoveAt(Int32).
Explicit interface implementationPrivate methodIBindingListApplySort
Sorts the list based on a PropertyDescriptor and a ListSortDirection.
Explicit interface implementationPrivate methodIBindingListViewApplySort
Sorts the data source based on the given ListSortDescriptionCollection.
Explicit interface implementationPrivate methodIListClear
Not supported. Clear the related entity collection instead.
Explicit interface implementationPrivate methodIListContains
Determines whether the IList contains a specific value.
Explicit interface implementationPrivate methodICollectionCopyTo
Copies the elements of the ICollection to an Array, starting at a particular Array index.
Explicit interface implementationPrivate propertyICollectionCount
Gets the number of elements contained in the ICollection.
Explicit interface implementationPrivate propertyIBindingListViewFilter
Gets or sets the filter to be used to exclude items from the collection of items returned by the data source
Explicit interface implementationPrivate methodIBindingListFind
Returns the index of the row that has the given PropertyDescriptor.
Explicit interface implementationPrivate methodIEnumerableTEntityGetEnumerator
Returns an enumerator that iterates through the collection.
Explicit interface implementationPrivate methodIEnumerableGetEnumerator
Returns an enumerator that iterates through a collection.
Explicit interface implementationPrivate methodIListIndexOf
Determines the index of a specific item in the IList.
Explicit interface implementationPrivate methodIListInsert
Not supported. Insert a new entity in the related collection instead.
Explicit interface implementationPrivate propertyIListIsFixedSize
Returns false
Explicit interface implementationPrivate propertyIListIsReadOnly
Returns false.
Explicit interface implementationPrivate propertyIBindingListIsSorted
Gets whether the items in the list are sorted.
Explicit interface implementationPrivate propertyICollectionIsSynchronized
Gets a value indicating whether access to the ICollection is synchronized (thread safe).
Explicit interface implementationPrivate propertyIListItem
Indexer via IList. Setter isn't supported, getter returns the typed indexer's value.
Explicit interface implementationPrivate methodIListRemove
Not supported. Remove the entity from the related collection instead.
Explicit interface implementationPrivate methodIListRemoveAt
Not supported. Remove the entity from the related collection instead.
Explicit interface implementationPrivate methodIBindingListViewRemoveFilter
Removes the current filter applied to the data source.
Explicit interface implementationPrivate methodIBindingListRemoveIndex
Removes the PropertyDescriptor from the indexes used for searching.
Explicit interface implementationPrivate methodIBindingListRemoveSort
Removes any sort applied using ApplySort(PropertyDescriptor, ListSortDirection).
Explicit interface implementationPrivate propertyIBindingListViewSortDescriptions
Gets the collection of sort descriptions currently applied to the data source.
Explicit interface implementationPrivate propertyIBindingListSortDirection
Gets the direction of the sort.
Explicit interface implementationPrivate propertyIBindingListSortProperty
Gets the PropertyDescriptor that is being used for sorting.
Explicit interface implementationPrivate propertyIBindingListViewSupportsAdvancedSorting
Gets a value indicating whether the data source supports advanced sorting.
Explicit interface implementationPrivate propertyIBindingListSupportsChangeNotification
Gets whether a ListChanged event is raised when the list changes or an item in the list changes.
Explicit interface implementationPrivate propertyIBindingListViewSupportsFiltering
Gets a value indicating whether the data source supports filtering.
Explicit interface implementationPrivate propertyIBindingListSupportsSearching
Gets whether the list supports searching using the Find(PropertyDescriptor, Object) method.
Explicit interface implementationPrivate propertyIBindingListSupportsSorting
Gets whether the list supports sorting.
Explicit interface implementationPrivate propertyICollectionSyncRoot
Gets an object that can be used to synchronize access to the ICollection.
Explicit interface implementationPrivate propertyIEntityViewCoreAllowEdit
Gets / sets whether you can update items in the list.
Explicit interface implementationPrivate propertyIEntityViewCoreAllowNew
Gets/sets whether you can add items to the list using AddNew.
Explicit interface implementationPrivate propertyIEntityViewCoreAllowRemove
Gets whether you can remove items from the list, using Remove(Object) or RemoveAt(Int32).
Explicit interface implementationPrivate propertyIEntityViewCoreCount
Gets the number of elements contained in the ICollection.
Explicit interface implementationPrivate propertyIEntityViewCoreDataChangeAction
Gets or sets the data change action which specifies what to do when the data in the related collection of an entity view changes. A change in data can be: entity added or changed. If an entity is removed from the underlying collection, the entity is simply removed from the entity view, as the view doesn't contain any data by itself.
Explicit interface implementationPrivate propertyIEntityViewCoreFilter
Gets or sets the filter to use for this entity view.
Explicit interface implementationPrivate methodIEntityViewCoreIndexOf
Determines the index of the entity passed in in the entity view in filtered and sorted state.
Explicit interface implementationPrivate propertyIEntityViewCoreItem
Gets the element at the specified index in this view.
Explicit interface implementationPrivate methodIEntityViewCoreRefresh
Refreshes this view by re-applying filter and sorter on the related collection
Explicit interface implementationPrivate propertyIEntityViewCoreSorter
Gets or sets the sorter for this entity view. Setting this property will re-sort the view and will reset the view in databinding scenario's.
Top
See Also