Namespace Vintagestory.API.Util
Classes
- AsyncHelper
A class to provide general helper functions for multi-threaded (asynchronous) operations
- CustomFastSerializerAttribute
Indicates that the FastSerialize() method should call a custom method to serialize this field: the custom method being of the pattern FastSerializerDelegate
- FastSerializer
A faster implementation of a ProtoBuf serializer.
Note 1: for int and ushort and other primitives/structs, the default value of 0 will not be written (because the read value will be 0 anyhow, so not writing the 0 value makes no difference to what the reader eventually reads): except in arrays and other simple collections such as List, where 0 values will be written, so that the reader reads out all subsequent values in the array with the correct indexing
Note 2: for reference types including string, if the value is null then nothing will be written. A read collection may therefore be shorter than the written collection, if the written collection included null values: be careful serializing arrays of reference types, if necessary replace null values with something else prior to serialization. For convenience, one special exception here is arrays or lists of string: if a null string is in the array, FastSerializer will instead automatically write an empty string "". (We don't do that for other reference types because it is not necessarily clear what the default non-null value should be....)
Structs
Interfaces
- IWithFastSerialize
Detected by the VintagestorySourcegen source generator, which replaces this default FastSerialize method with a source-generated version