C# Class Bamboo.Prevalence.Collections.List

Inheritance: IList
显示文件 Open project: bamboo/Bamboo.Prevalence Class Usage Examples

Protected Properties

Property Type Description
_list System.Collections.ArrayList
_random System.Random

Public Methods

Method Description
AcquireReaderLock ( ) : void
AcquireWriterLock ( ) : void
Add ( object value ) : int
AddRange ( IList range ) : void
Any ( Predicate predicate ) : bool
Apply ( System.Action action ) : void

Applies an action to every object in the list in the context of a writer lock.

Choose ( int count ) : Array

Choose ( ) : object

Selects an random item from the list.

Clear ( ) : void
Clone ( ) : ReaderWriterList
Collect ( Predicate predicate, Type returnItemType ) : Array
Collect ( Predicate predicate ) : object[]
Collect ( IList list, Predicate predicate ) : void
Contains ( object value ) : bool
CopyTo ( System array, int index ) : void
Find ( Predicate predicate ) : object
GetEnumerator ( ) : System.Collections.IEnumerator
GetRange ( int index, int count ) : object[]
IndexOf ( Predicate predicate ) : int
IndexOf ( object value ) : int
Insert ( int index, object value ) : void
List ( ) : System
List ( ICollection collection ) : System
List ( int initialCapacity ) : System
Map ( IEnumerable list ) : void

Maps every object in this list to an equivalent (Equals(item) returns true) in the list passed as argument. The entire mapping operation is accomplished in the context of a writer lock.

Map ( Mapping mapping ) : void

Maps every object in the list according to the mapping delegate in the context of a writer lock.

PopAny ( ) : object

Selects a random item from the list and removes it.

ReleaseReaderLock ( ) : void
ReleaseWriterLock ( ) : void
Remove ( object value ) : void
RemoveAt ( int index ) : void
Reverse ( ) : List
Sort ( ) : void
Sort ( IComparer comparer ) : void
ToArray ( Type type ) : Array
ToArray ( ) : object[]
ToShuffledArray ( Type elementType ) : Array
ToShuffledArray ( ) : object[]
ToSortedArray ( IComparer comparer, Type returnItemType ) : Array
ToSortedArray ( IComparer comparer ) : object[]
this ( int index ) : object

Protected Methods

Method Description
InnerCollect ( IList list, Predicate predicate ) : void

Method Details

AcquireReaderLock() public method

public AcquireReaderLock ( ) : void
return void

AcquireWriterLock() public method

public AcquireWriterLock ( ) : void
return void

Add() public method

public Add ( object value ) : int
value object
return int

AddRange() public method

public AddRange ( IList range ) : void
range IList
return void

Any() public method

public Any ( Predicate predicate ) : bool
predicate Predicate
return bool

Apply() public method

Applies an action to every object in the list in the context of a writer lock.
public Apply ( System.Action action ) : void
action System.Action
return void

Choose() public method

public Choose ( int count ) : Array
count int
return System.Array

Choose() public method

Selects an random item from the list.
public Choose ( ) : object
return object

Clear() public method

public Clear ( ) : void
return void

Clone() public method

public Clone ( ) : ReaderWriterList
return ReaderWriterList

Collect() public method

public Collect ( Predicate predicate, Type returnItemType ) : Array
predicate Predicate
returnItemType System.Type
return System.Array

Collect() public method

public Collect ( Predicate predicate ) : object[]
predicate Predicate
return object[]

Collect() public method

public Collect ( IList list, Predicate predicate ) : void
list IList
predicate Predicate
return void

Contains() public method

public Contains ( object value ) : bool
value object
return bool

CopyTo() public method

public CopyTo ( System array, int index ) : void
array System
index int
return void

Find() public method

public Find ( Predicate predicate ) : object
predicate Predicate
return object

GetEnumerator() public method

public GetEnumerator ( ) : System.Collections.IEnumerator
return System.Collections.IEnumerator

GetRange() public method

public GetRange ( int index, int count ) : object[]
index int
count int
return object[]

IndexOf() public method

public IndexOf ( Predicate predicate ) : int
predicate Predicate
return int

IndexOf() public method

public IndexOf ( object value ) : int
value object
return int

InnerCollect() protected method

protected InnerCollect ( IList list, Predicate predicate ) : void
list IList
predicate Predicate
return void

Insert() public method

public Insert ( int index, object value ) : void
index int
value object
return void

List() public method

public List ( ) : System
return System

List() public method

public List ( ICollection collection ) : System
collection ICollection
return System

List() public method

public List ( int initialCapacity ) : System
initialCapacity int
return System

Map() public method

Maps every object in this list to an equivalent (Equals(item) returns true) in the list passed as argument. The entire mapping operation is accomplished in the context of a writer lock.
public Map ( IEnumerable list ) : void
list IEnumerable
return void

Map() public method

Maps every object in the list according to the mapping delegate in the context of a writer lock.
public Map ( Mapping mapping ) : void
mapping Mapping
return void

PopAny() public method

Selects a random item from the list and removes it.
public PopAny ( ) : object
return object

ReleaseReaderLock() public method

public ReleaseReaderLock ( ) : void
return void

ReleaseWriterLock() public method

public ReleaseWriterLock ( ) : void
return void

Remove() public method

public Remove ( object value ) : void
value object
return void

RemoveAt() public method

public RemoveAt ( int index ) : void
index int
return void

Reverse() public method

public Reverse ( ) : List
return List

Sort() public method

public Sort ( ) : void
return void

Sort() public method

public Sort ( IComparer comparer ) : void
comparer IComparer
return void

ToArray() public method

public ToArray ( Type type ) : Array
type System.Type
return System.Array

ToArray() public method

public ToArray ( ) : object[]
return object[]

ToShuffledArray() public method

public ToShuffledArray ( Type elementType ) : Array
elementType System.Type
return System.Array

ToShuffledArray() public method

public ToShuffledArray ( ) : object[]
return object[]

ToSortedArray() public method

public ToSortedArray ( IComparer comparer, Type returnItemType ) : Array
comparer IComparer
returnItemType System.Type
return System.Array

ToSortedArray() public method

public ToSortedArray ( IComparer comparer ) : object[]
comparer IComparer
return object[]

this() public method

public this ( int index ) : object
index int
return object

Property Details

_list protected_oe property

protected ArrayList,System.Collections _list
return System.Collections.ArrayList

_random protected_oe static_oe property

protected static Random,System _random
return System.Random