CSLA.NET 5.4.2
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
Csla.NameValueListBase< K, V > Class Template Reference

This is the base class from which readonly name/value collections should be derived. More...

Inheritance diagram for Csla.NameValueListBase< K, V >:
Csla.Core.ReadOnlyBindingList< NameValueListBase< K, V >.NameValuePair > Csla.Core.IBusinessObject

Classes

class  NameValuePair
 Contains a key and value pair. More...
 

Public Member Functions

Value (K key)
 Returns the value corresponding to the specified key. More...
 
Key (V value)
 Returns the key corresponding to the first occurance of the specified value in the list. More...
 
bool ContainsKey (K key)
 Gets a value indicating whether the list contains the specified key. More...
 
bool ContainsValue (V value)
 Gets a value indicating whether the list contains the specified value. More...
 
NameValuePair GetItemByValue (V value)
 Get the item for the first matching value in the collection. More...
 
NameValuePair GetItemByKey (K key)
 Get the item for the first matching key in the collection. More...
 
NameValueListBase< K, V > Clone ()
 Creates a clone of the object. More...
 

Protected Member Functions

 NameValueListBase ()
 Creates an instance of the object. More...
 
virtual void Initialize ()
 Override this method to set up event handlers so user code in a partial class can respond to events raised by generated code. More...
 
virtual object GetClone ()
 Creates a clone of the object. More...
 
virtual void DataPortal_OnDataPortalInvoke (DataPortalEventArgs e)
 Called by the server-side DataPortal prior to calling the requested DataPortal_XYZ method. More...
 
virtual void DataPortal_OnDataPortalInvokeComplete (DataPortalEventArgs e)
 Called by the server-side DataPortal after calling the requested DataPortal_XYZ method. More...
 
virtual void DataPortal_OnDataPortalException (DataPortalEventArgs e, Exception ex)
 Called by the server-side DataPortal if an exception occurs during data access. More...
 
- Protected Member Functions inherited from Csla.Core.ReadOnlyBindingList< NameValueListBase< K, V >.NameValuePair >
override void SetLoadListMode (bool enabled)
 Sets the LoadListMode for the collection More...
 
 ReadOnlyBindingList ()
 Creates an instance of the object. More...
 
override void ClearItems ()
 Prevents clearing the collection. More...
 
override object AddNewCore ()
 Prevents insertion of items into the collection. More...
 
override void InsertItem (int index, C item)
 Prevents insertion of items into the collection. More...
 
override void RemoveItem (int index)
 Removes the item at the specified index if the collection is not in readonly mode. More...
 
override void SetItem (int index, C item)
 Replaces the item at the specified index with the specified item if the collection is not in readonly mode. More...
 
override void OnGetState (Csla.Serialization.Mobile.SerializationInfo info)
 Override this method to insert your field values into the MobileFormatter serialzation stream. More...
 
override void OnSetState (Csla.Serialization.Mobile.SerializationInfo info)
 Override this method to retrieve your field values from the MobileFormatter serialzation stream. More...
 
override void OnSetChildren (Csla.Serialization.Mobile.SerializationInfo info, Csla.Serialization.Mobile.MobileFormatter formatter)
 Override this method to retrieve your child object references from the MobileFormatter serialzation stream. More...
 

Additional Inherited Members

- Properties inherited from Csla.Core.ReadOnlyBindingList< NameValueListBase< K, V >.NameValuePair >
bool IsReadOnly [getprotected set]
 Gets or sets a value indicating whether the list is readonly. More...
 
virtual bool IsReadOnlyCore [getset]
 Gets or sets a value indicating whether the list is readonly. More...
 
override bool IsBusy [get]
 Gets a value indicating whether this object or its child objects are busy. More...
 
- Properties inherited from Csla.Core.IBusinessObject
int Identity [get]
 Gets a value representing this object instance's unique identity value within the business object graph. More...
 

Detailed Description

This is the base class from which readonly name/value collections should be derived.

Template Parameters
KType of the key values.
VType of the values.

Definition at line 25 of file NameValueListBase.cs.

Constructor & Destructor Documentation

◆ NameValueListBase()

Creates an instance of the object.

Definition at line 134 of file NameValueListBase.cs.

Member Function Documentation

◆ Clone()

NameValueListBase< K, V > Csla.NameValueListBase< K, V >.Clone ( )

Creates a clone of the object.

Definition at line 258 of file NameValueListBase.cs.

◆ ContainsKey()

bool Csla.NameValueListBase< K, V >.ContainsKey ( key)

Gets a value indicating whether the list contains the specified key.

Parameters
keyKey value for which to search.

Definition at line 64 of file NameValueListBase.cs.

◆ ContainsValue()

bool Csla.NameValueListBase< K, V >.ContainsValue ( value)

Gets a value indicating whether the list contains the specified value.

Parameters
valueValue for which to search.

Definition at line 77 of file NameValueListBase.cs.

◆ DataPortal_OnDataPortalException()

virtual void Csla.NameValueListBase< K, V >.DataPortal_OnDataPortalException ( DataPortalEventArgs  e,
Exception  ex 
)
protectedvirtual

Called by the server-side DataPortal if an exception occurs during data access.

Parameters
eThe DataPortalContext object passed to the DataPortal.
exThe Exception thrown during data access.

Definition at line 311 of file NameValueListBase.cs.

◆ DataPortal_OnDataPortalInvoke()

virtual void Csla.NameValueListBase< K, V >.DataPortal_OnDataPortalInvoke ( DataPortalEventArgs  e)
protectedvirtual

Called by the server-side DataPortal prior to calling the requested DataPortal_XYZ method.

Parameters
eThe DataPortalContext object passed to the DataPortal.

Definition at line 286 of file NameValueListBase.cs.

◆ DataPortal_OnDataPortalInvokeComplete()

virtual void Csla.NameValueListBase< K, V >.DataPortal_OnDataPortalInvokeComplete ( DataPortalEventArgs  e)
protectedvirtual

Called by the server-side DataPortal after calling the requested DataPortal_XYZ method.

Parameters
eThe DataPortalContext object passed to the DataPortal.

Definition at line 298 of file NameValueListBase.cs.

◆ GetClone()

virtual object Csla.NameValueListBase< K, V >.GetClone ( )
protectedvirtual

Creates a clone of the object.

Returns
A new object containing the exact data of the original object.

Definition at line 250 of file NameValueListBase.cs.

◆ GetItemByKey()

NameValuePair Csla.NameValueListBase< K, V >.GetItemByKey ( key)

Get the item for the first matching key in the collection.

Parameters
keyKey to search for in the list.
Returns
Item from the list.

Definition at line 115 of file NameValueListBase.cs.

◆ GetItemByValue()

NameValuePair Csla.NameValueListBase< K, V >.GetItemByValue ( value)

Get the item for the first matching value in the collection.

Parameters
valueValue to search for in the list.
Returns
Item from the list.

Definition at line 93 of file NameValueListBase.cs.

◆ Initialize()

virtual void Csla.NameValueListBase< K, V >.Initialize ( )
protectedvirtual

Override this method to set up event handlers so user code in a partial class can respond to events raised by generated code.

Definition at line 146 of file NameValueListBase.cs.

◆ Key()

K Csla.NameValueListBase< K, V >.Key ( value)

Returns the key corresponding to the first occurance of the specified value in the list.

Parameters
valueValue for which to retrieve the key.

Definition at line 51 of file NameValueListBase.cs.

◆ Value()

V Csla.NameValueListBase< K, V >.Value ( key)

Returns the value corresponding to the specified key.

Parameters
keyKey value for which to retrieve a value.

Definition at line 37 of file NameValueListBase.cs.