Skip to main content

Class SyncList<T>

Inheritance
System.Object
Inherited Members
Show
Syntax
public class SyncList<T> : IList<T>, ICollection<T>, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable, ISyncObject
Type Parameters
NameDescription
T

Constructors

SyncList()

Declaration
public SyncList()

SyncList(IEqualityComparer<T>)

Declaration
public SyncList(IEqualityComparer<T> comparer)
Parameters
TypeNameDescription
System.Collections.Generic.IEqualityComparer<T>comparer

SyncList(IList<T>, IEqualityComparer<T>)

Declaration
public SyncList(IList<T> objects, IEqualityComparer<T> comparer = null)
Parameters
TypeNameDescription
System.Collections.Generic.IList<T>objects
System.Collections.Generic.IEqualityComparer<T>comparer

Properties

Count

Declaration
public int Count { get; }

IsReadOnly

Declaration
public bool IsReadOnly { get; }

IsDirty

Declaration
public bool IsDirty { get; }

Item[Int32]

Declaration
public T this[int i] { get; set; }

Methods

ISyncObject.SetShouldSyncFrom(Boolean)

Declaration
void ISyncObject.SetShouldSyncFrom(bool shouldSync)
Parameters
TypeNameDescription
System.BooleanshouldSync

ISyncObject.SetNetworkBehaviour(NetworkBehaviour)

Declaration
void ISyncObject.SetNetworkBehaviour(NetworkBehaviour networkBehaviour)
Parameters
TypeNameDescription
Mirage.NetworkBehaviournetworkBehaviour

Flush()

Declaration
public void Flush()

Reset()

Declaration
public void Reset()

OnSerializeAll(NetworkWriter)

Declaration
public void OnSerializeAll(NetworkWriter writer)
Parameters
TypeNameDescription
Mirage.Serialization.NetworkWriterwriter

OnSerializeDelta(NetworkWriter)

Declaration
public void OnSerializeDelta(NetworkWriter writer)
Parameters
TypeNameDescription
Mirage.Serialization.NetworkWriterwriter

OnDeserializeAll(NetworkReader)

Declaration
public void OnDeserializeAll(NetworkReader reader)
Parameters
TypeNameDescription
Mirage.Serialization.NetworkReaderreader

OnDeserializeDelta(NetworkReader)

Declaration
public void OnDeserializeDelta(NetworkReader reader)
Parameters
TypeNameDescription
Mirage.Serialization.NetworkReaderreader

Add(T)

Declaration
public void Add(T item)
Parameters
TypeNameDescription
Titem

AddRange(IEnumerable<T>)

Declaration
public void AddRange(IEnumerable<T> range)
Parameters
TypeNameDescription
System.Collections.Generic.IEnumerable<T>range

Clear()

Declaration
public void Clear()

Contains(T)

Declaration
public bool Contains(T item)
Parameters
TypeNameDescription
Titem
Returns
TypeDescription
System.Boolean

CopyTo(T[], Int32)

Declaration
public void CopyTo(T[] array, int arrayIndex)
Parameters
TypeNameDescription
{T}[]array
System.Int32arrayIndex

IndexOf(T)

Declaration
public int IndexOf(T item)
Parameters
TypeNameDescription
Titem
Returns
TypeDescription
System.Int32

FindIndex(Predicate<T>)

Declaration
public int FindIndex(Predicate<T> match)
Parameters
TypeNameDescription
System.Predicate<T>match
Returns
TypeDescription
System.Int32

Find(Predicate<T>)

Declaration
public T Find(Predicate<T> match)
Parameters
TypeNameDescription
System.Predicate<T>match
Returns
TypeDescription
T

FindAll(Predicate<T>)

Declaration
public List<T> FindAll(Predicate<T> match)
Parameters
TypeNameDescription
System.Predicate<T>match
Returns
TypeDescription
System.Collections.Generic.List<T>

Insert(Int32, T)

Declaration
public void Insert(int index, T item)
Parameters
TypeNameDescription
System.Int32index
Titem

InsertRange(Int32, IEnumerable<T>)

Declaration
public void InsertRange(int index, IEnumerable<T> range)
Parameters
TypeNameDescription
System.Int32index
System.Collections.Generic.IEnumerable<T>range

Remove(T)

Declaration
public bool Remove(T item)
Parameters
TypeNameDescription
Titem
Returns
TypeDescription
System.Boolean

RemoveAt(Int32)

Declaration
public void RemoveAt(int index)
Parameters
TypeNameDescription
System.Int32index

RemoveAll(Predicate<T>)

Declaration
public int RemoveAll(Predicate<T> match)
Parameters
TypeNameDescription
System.Predicate<T>match
Returns
TypeDescription
System.Int32

SetItemDirty(T)

Can be used to set item dirty manually. should be used with classes to avoid having to clear field first Will invoke OnSet

Declaration
public void SetItemDirty(T item)
Parameters
TypeNameDescription
Titem

SetItemDirtyAt(Int32)

Can be used to set item dirty manually. should be used with classes to avoid having to clear field first

Declaration
public void SetItemDirtyAt(int index)
Parameters
TypeNameDescription
System.Int32index

GetEnumerator()

Declaration
public SyncList<T>.Enumerator GetEnumerator()
Returns
TypeDescription
Mirage.Collections.SyncList.Enumerator<>

IEnumerable<T>.GetEnumerator()

Declaration
IEnumerator<T> IEnumerable<T>.GetEnumerator()
Returns
TypeDescription
System.Collections.Generic.IEnumerator<T>

IEnumerable.GetEnumerator()

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
TypeDescription
System.Collections.IEnumerator