Table of Contents

Class CustomFastSerializerAttribute

Namespace
Vintagestory.API.Util
Assembly
VintagestoryAPI.dll

Indicates that the FastSerialize() method should call a custom method to serialize this field. The custom method being of the pattern "FastSerialize[memberName](ms, fieldId, ref count, ref position);" , where memberName will automatically strip a "Serialized" suffix from the field name for the called methode name, so "EntitiesCount" and "EntitiesSerialized" field will generate the following code: FastSerializeEntitiesCount(ms, 5, ref count, ref position); FastSerializeEntities(ms, 6, ref count, ref position);. The FastSerializeEntitiesCount() and FastSerializeEntities() need to be implemented in the class by hand. See FastSerializeGenerator.cs Open in GitHub

[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class CustomFastSerializerAttribute : Attribute
Inheritance
CustomFastSerializerAttribute
Inherited Members
Extension Methods

Constructors

CustomFastSerializerAttribute()

public CustomFastSerializerAttribute()