Joutsen v0.5.0+12-g5dd5f7e
Static Public Member Functions | List of all members
Joutsen.Linq.ListExtensions Class Reference

A class offering extension methods for Lists. More...

Static Public Member Functions

static Listable< ItemType > AsReadOnly< ItemType > (this List< ItemType > list)
 Creates a read only instance of an existing list. More...
 
static Listable< ItemType > AsReadOnly< ItemType > (this Listable< ItemType > list, bool persistItems=false)
 Creates a read only instance of an existing list. More...
 

Detailed Description

A class offering extension methods for Lists.

Since
0.4.0

Member Function Documentation

◆ AsReadOnly< ItemType >() [1/2]

static Listable< ItemType > Joutsen.Linq.ListExtensions.AsReadOnly< ItemType > ( this List< ItemType >  list)
static

Creates a read only instance of an existing list.

Parameters
listthe existing list
Returns
the read only instance of the list
Remarks
This method does not copy the items of the list but uses a thin wrapper that grants only access.

◆ AsReadOnly< ItemType >() [2/2]

static Listable< ItemType > Joutsen.Linq.ListExtensions.AsReadOnly< ItemType > ( this Listable< ItemType >  list,
bool  persistItems = false 
)
static

Creates a read only instance of an existing list.

Parameters
listthe existing list
persistItemsif false changes to the original list will also effect the read only instance, otherwise a copy of the items is used and changes to the original list will not affect the read only instance
Returns
the read only instance of the list
Remarks
This method does not copy the items of the list but uses a thin wrapper that grants only access.
Since
0.5.0