Class CollectionExtensions
Inheritance
System.Object
Inherited Members
Show
Syntax
public static class CollectionExtensions
Methods
WriteBytesAndSize(NetworkWriter, Byte[], Int32, Int32)
For byte arrays with dynamic size, where the reader doesn't know how many will come
Declaration
public static void WriteBytesAndSize(this NetworkWriter writer, byte[] buffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
Mirage.Serialization.NetworkWriter | writer | |
System.Byte[] | buffer | array or null |
System.Int32 | offset | |
System.Int32 | count |
WriteBytesAndSize(NetworkWriter, Byte[])
Write method for weaver to use
Declaration
public static void WriteBytesAndSize(this NetworkWriter writer, byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
Mirage.Serialization.NetworkWriter | writer | |
System.Byte[] | buffer | array or null |
WriteBytesAndSizeSegment(NetworkWriter, ArraySegment<Byte>)
Declaration
public static void WriteBytesAndSizeSegment(this NetworkWriter writer, ArraySegment<byte> buffer)
Parameters
Type | Name | Description |
---|---|---|
Mirage.Serialization.NetworkWriter | writer | |
System.ArraySegment<System.Byte> | buffer |
WriteList<T>(NetworkWriter, List<T>)
Declaration
[WeaverSerializeCollection]
public static void WriteList<T>(this NetworkWriter writer, List<T> list)
Parameters
Type | Name | Description |
---|---|---|
Mirage.Serialization.NetworkWriter | writer | |
System.Collections.Generic.List<T> | list |
WriteArray<T>(NetworkWriter, T[])
Declaration
public static void WriteArray<T>(this NetworkWriter writer, T[] array)
Parameters
Type | Name | Description |
---|---|---|
Mirage.Serialization.NetworkWriter | writer | |
{T}[] | array |
WriteArraySegment<T>(NetworkWriter, ArraySegment<T>)
Declaration
[WeaverSerializeCollection]
public static void WriteArraySegment<T>(this NetworkWriter writer, ArraySegment<T> segment)
Parameters
Type | Name | Description |
---|---|---|
Mirage.Serialization.NetworkWriter | writer | |
System.ArraySegment<T> | segment |
WriteDictionary<TKey, TValue>(NetworkWriter, Dictionary<TKey, TValue>)
Declaration
[WeaverSerializeCollection]
public static void WriteDictionary<TKey, TValue>(this NetworkWriter writer, Dictionary<TKey, TValue> dictionary)
Parameters
Type | Name | Description |
---|---|---|
Mirage.Serialization.NetworkWriter | writer | |
System.Collections.Generic.Dictionary<TKey, TValue> | dictionary |
ReadBytesAndSize(NetworkReader)
Declaration
public static byte[] ReadBytesAndSize(this NetworkReader reader)
Parameters
Type | Name | Description |
---|---|---|
Mirage.Serialization.NetworkReader | reader |
Returns
Type | Description |
---|---|
System.Byte[] | array or null |
ReadBytesAndSizeSegment(NetworkReader)
Declaration
public static ArraySegment<byte> ReadBytesAndSizeSegment(this NetworkReader reader)
Parameters
Type | Name | Description |
---|---|---|
Mirage.Serialization.NetworkReader | reader |
Returns
Type | Description |
---|---|
System.ArraySegment<System.Byte> |
ReadBytes(NetworkReader, Int32)
Declaration
public static byte[] ReadBytes(this NetworkReader reader, int count)
Parameters
Type | Name | Description |
---|---|---|
Mirage.Serialization.NetworkReader | reader | |
System.Int32 | count |
Returns
Type | Description |
---|---|
System.Byte[] |
ReadList<T>(NetworkReader)
Declaration
[WeaverSerializeCollection]
public static List<T> ReadList<T>(this NetworkReader reader)
Parameters
Type | Name | Description |
---|---|---|
Mirage.Serialization.NetworkReader | reader |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<T> |
ReadArray<T>(NetworkReader)
Declaration
public static T[] ReadArray<T>(this NetworkReader reader)
Parameters
Type | Name | Description |
---|---|---|
Mirage.Serialization.NetworkReader | reader |
Returns
Type | Description |
---|---|
{T}[] |
ReadArraySegment<T>(NetworkReader)
Declaration
[WeaverSerializeCollection]
public static ArraySegment<T> ReadArraySegment<T>(this NetworkReader reader)
Parameters
Type | Name | Description |
---|---|---|
Mirage.Serialization.NetworkReader | reader |
Returns
Type | Description |
---|---|
System.ArraySegment<T> |
ReadDictionary<TKey, TValue>(NetworkReader)
Declaration
[WeaverSerializeCollection]
public static Dictionary<TKey, TValue> ReadDictionary<TKey, TValue>(this NetworkReader reader)
Parameters
Type | Name | Description |
---|---|---|
Mirage.Serialization.NetworkReader | reader |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<TKey, TValue> |