Enhanced C#
Loyc library documentation
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Public fields | Public Member Functions | List of all members
Loyc.SyncLib.Impl.MemoryBuilder< T > Struct Template Reference

Source file:
Inheritance diagram for Loyc.SyncLib.Impl.MemoryBuilder< T >:
Loyc.SyncLib.Impl.IListBuilder< out TList, T > Loyc.SyncLib.Impl.IListBuilder< out TList, T >

Public fields

InternalList< T > _list
 
Memory< T > List => _list.AsMemory()
 
ReadOnlyMemory< T >
IListBuilder< ReadOnlyMemory
< T >, T >. 
List => _list.AsMemory()
 
Memory< T > Empty => default
 
ReadOnlyMemory< T >
IListBuilder< ReadOnlyMemory
< T >, T >. 
Empty => default
 

Public Member Functions

object Alloc (int minLength)
 A method that is always called once when loading a list. More...
 
Memory< T > CastList (object value)
 When the list being loaded was already read from the data stream earlier, this property is called to convert that existing object to the target list type, skipping the usual calls to Alloc(), Add(T) and List. More...
 
ReadOnlyMemory< T >
IListBuilder< ReadOnlyMemory
< T >, T >. 
CastList (object value)
 When the list being loaded was already read from the data stream earlier, this property is called to convert that existing object to the target list type, skipping the usual calls to Alloc(), Add(T) and List. More...
 
void Add (T item)
 

Additional Inherited Members

- Properties inherited from Loyc.SyncLib.Impl.IListBuilder< out TList, T >
TList List [get]
 Called once when done loading to retrieve the list. More...
 
TList Empty [get]
 Returns an empty list, bypassing the normal building process More...
 

Member Function Documentation

object Loyc.SyncLib.Impl.MemoryBuilder< T >.Alloc ( int  minLength)
inline

A method that is always called once when loading a list.

Parameters
minLengthMinimum list size (ISyncManager.MinimumListLength)
Returns
Returns the list object so that it can be assigned as the ISyncManager.CurrentObject in case the list contains a cyclic reference to itself. If a cyclic reference is not possible, this method can return null.

Implements Loyc.SyncLib.Impl.IListBuilder< out TList, T >.

Memory<T> Loyc.SyncLib.Impl.MemoryBuilder< T >.CastList ( object  value)
inline

When the list being loaded was already read from the data stream earlier, this property is called to convert that existing object to the target list type, skipping the usual calls to Alloc(), Add(T) and List.

Implements Loyc.SyncLib.Impl.IListBuilder< out TList, T >.

ReadOnlyMemory<T> IListBuilder<ReadOnlyMemory<T>, T>. Loyc.SyncLib.Impl.MemoryBuilder< T >.CastList ( object  value)
inline

When the list being loaded was already read from the data stream earlier, this property is called to convert that existing object to the target list type, skipping the usual calls to Alloc(), Add(T) and List.

Implements Loyc.SyncLib.Impl.IListBuilder< out TList, T >.