Class SyncWorker
An abstract class that can be both a reader and a writer depending on implementation.
Namespace: UnofficialMultiplayerAPI
Assembly: 0UnofficialMultiplayerAPI.dll
Syntax
public abstract class SyncWorker
Remarks
See ISyncable and SyncerAttribute for usage examples.
Constructors
SyncWorker(Boolean)
Declaration
protected SyncWorker(bool isWriting)
Parameters
| Type | Name | Description |
|---|---|---|
| Boolean | isWriting |
Fields
isWriting
true if is currently writing.
Declaration
public readonly bool isWriting
Field Value
| Type | Description |
|---|---|
| Boolean |
Methods
Bind(ref Boolean)
Reads or writes an object referenced by obj.
Declaration
public abstract void Bind(ref bool obj)
Parameters
| Type | Name | Description |
|---|---|---|
| Boolean | obj | object to bind |
Bind(ref Byte)
Reads or writes an object referenced by obj.
Declaration
public abstract void Bind(ref byte obj)
Parameters
| Type | Name | Description |
|---|---|---|
| Byte | obj | object to bind |
Bind(ref Double)
Reads or writes an object referenced by obj.
Declaration
public abstract void Bind(ref double obj)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | obj | object to bind |
Bind(ref Int16)
Reads or writes an object referenced by obj.
Declaration
public abstract void Bind(ref short obj)
Parameters
| Type | Name | Description |
|---|---|---|
| Int16 | obj | object to bind |
Bind(ref Int32)
Reads or writes an object referenced by obj.
Declaration
public abstract void Bind(ref int obj)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | obj | object to bind |
Bind(ref Int64)
Reads or writes an object referenced by obj.
Declaration
public abstract void Bind(ref long obj)
Parameters
| Type | Name | Description |
|---|---|---|
| Int64 | obj | object to bind |
Bind(Object, String)
Uses reflection to bind a field or property
Declaration
public abstract void Bind(object obj, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | obj | object where the field or property can be found if null, |
| String | name | path to the field or property |
Bind(ref SByte)
Reads or writes an object referenced by obj.
Declaration
public abstract void Bind(ref sbyte obj)
Parameters
| Type | Name | Description |
|---|---|---|
| SByte | obj | object to bind |
Bind(ref Single)
Reads or writes an object referenced by obj.
Declaration
public abstract void Bind(ref float obj)
Parameters
| Type | Name | Description |
|---|---|---|
| Single | obj | object to bind |
Bind(ref String)
Reads or writes an object referenced by obj.
Declaration
public abstract void Bind(ref string obj)
Parameters
| Type | Name | Description |
|---|---|---|
| String | obj | object to bind |
Bind(ref UInt16)
Reads or writes an object referenced by obj.
Declaration
public abstract void Bind(ref ushort obj)
Parameters
| Type | Name | Description |
|---|---|---|
| UInt16 | obj | object to bind |
Bind(ref UInt32)
Reads or writes an object referenced by obj.
Declaration
public abstract void Bind(ref uint obj)
Parameters
| Type | Name | Description |
|---|---|---|
| UInt32 | obj | object to bind |
Bind(ref UInt64)
Reads or writes an object referenced by obj.
Declaration
public abstract void Bind(ref ulong obj)
Parameters
| Type | Name | Description |
|---|---|---|
| UInt64 | obj | object to bind |
Bind(ref ISyncable)
Reads or writes an object inheriting ISyncable interface.
Declaration
public void Bind(ref ISyncable obj)
Parameters
| Type | Name | Description |
|---|---|---|
| ISyncable | obj | object to bind |
Remarks
Does not create a new object.
Bind<T>(ref T)
Reads or writes an object referenced by obj
Declaration
public abstract void Bind<T>(ref T obj)
Parameters
| Type | Name | Description |
|---|---|---|
| T | obj | object to bind |
Type Parameters
| Name | Description |
|---|---|
| T | type of the object to bind |
Remarks
Can read/write types using user defined syncers, ISyncables and readers/writers implemented by the multiplayer mod.