Semi Mod Loader
Public Member Functions | Properties | List of all members
Semi.ProxyList< TSource, TTarget > Struct Template Reference

Struct that behaves like a list but does conversion operators internally to provide an IList of a different type without allocating any memory. More...

Inheritance diagram for Semi.ProxyList< TSource, TTarget >:

Public Member Functions

delegate TSource ConvertOperation (TTarget obj)
 Convert operation. Receives a target type, outputs a source type. More...
 
delegate TTarget RevertOperation (TSource obj)
 Convert operation. Receives a target type, outputs a source type. More...
 
 ProxyList (IList< TTarget > target, ConvertOperation cop, RevertOperation rop)
 
int IndexOf (TSource item)
 
void Insert (int index, TSource item)
 
void RemoveAt (int index)
 
void Add (TSource item)
 
void Clear ()
 
bool Contains (TSource item)
 
void CopyTo (TSource[] array, int arrayIndex)
 
bool Remove (TSource item)
 
IEnumerator< TSource > GetEnumerator ()
 
IEnumerator IEnumerable. GetEnumerator ()
 
IList< TTarget > ToTarget ()
 
TTarget[] ToTargetArray ()
 
ProxyList< TSource, TTarget > ConvertCompatibleList (IList< TSource > list)
 

Properties

int Count [get]
 
bool IsReadOnly [get]
 
TSource this[int index] [get, set]
 

Detailed Description

Struct that behaves like a list but does conversion operators internally to provide an IList of a different type without allocating any memory.

Template Parameters
TSourceSource type (that is, the type that you want this ProxyList to act as a list of)
TTargetTarget type (that is, the element type of the real list/array underneath)

Constructor & Destructor Documentation

◆ ProxyList()

Semi.ProxyList< TSource, TTarget >.ProxyList ( IList< TTarget >  target,
ConvertOperation  cop,
RevertOperation  rop 
)
inline

Member Function Documentation

◆ Add()

void Semi.ProxyList< TSource, TTarget >.Add ( TSource  item)
inline

◆ Clear()

void Semi.ProxyList< TSource, TTarget >.Clear ( )
inline

◆ Contains()

bool Semi.ProxyList< TSource, TTarget >.Contains ( TSource  item)
inline

◆ ConvertCompatibleList()

ProxyList<TSource, TTarget> Semi.ProxyList< TSource, TTarget >.ConvertCompatibleList ( IList< TSource >  list)
inline

◆ ConvertOperation()

delegate TSource Semi.ProxyList< TSource, TTarget >.ConvertOperation ( TTarget  obj)

Convert operation. Receives a target type, outputs a source type.

◆ CopyTo()

void Semi.ProxyList< TSource, TTarget >.CopyTo ( TSource[]  array,
int  arrayIndex 
)
inline

◆ GetEnumerator() [1/2]

IEnumerator<TSource> Semi.ProxyList< TSource, TTarget >.GetEnumerator ( )
inline

◆ GetEnumerator() [2/2]

IEnumerator IEnumerable. Semi.ProxyList< TSource, TTarget >.GetEnumerator ( )
inline

◆ IndexOf()

int Semi.ProxyList< TSource, TTarget >.IndexOf ( TSource  item)
inline

◆ Insert()

void Semi.ProxyList< TSource, TTarget >.Insert ( int  index,
TSource  item 
)
inline

◆ Remove()

bool Semi.ProxyList< TSource, TTarget >.Remove ( TSource  item)
inline

◆ RemoveAt()

void Semi.ProxyList< TSource, TTarget >.RemoveAt ( int  index)
inline

◆ RevertOperation()

delegate TTarget Semi.ProxyList< TSource, TTarget >.RevertOperation ( TSource  obj)

Convert operation. Receives a target type, outputs a source type.

◆ ToTarget()

IList<TTarget> Semi.ProxyList< TSource, TTarget >.ToTarget ( )
inline

◆ ToTargetArray()

TTarget [] Semi.ProxyList< TSource, TTarget >.ToTargetArray ( )
inline

Property Documentation

◆ Count

int Semi.ProxyList< TSource, TTarget >.Count
get

◆ IsReadOnly

bool Semi.ProxyList< TSource, TTarget >.IsReadOnly
get

◆ this[int index]

TSource Semi.ProxyList< TSource, TTarget >.this[int index]
getset

The documentation for this struct was generated from the following file: