Class StreamedByteArrayAttribute
- Namespace
- Vintagestory.API.Datastructures
- Assembly
- VintagestoryAPI.dll
When serialized, produces identical byte output to a ByteArrayAttribute. The difference is, for performance, this writes directly to the provided BinaryWriter stream
Intended to be deserialized to a ByteArrayAttribute Open in GitHub
public class StreamedByteArrayAttribute : ArrayAttribute<byte>, IAttribute
- Inheritance
-
StreamedByteArrayAttribute
- Implements
- Inherited Members
- Extension Methods
Constructors
StreamedByteArrayAttribute(FastMemoryStream)
public StreamedByteArrayAttribute(FastMemoryStream ms)
Parameters
Methods
BeginDirectWrite(BinaryWriter, string)
public void BeginDirectWrite(BinaryWriter stream, string key)
Parameters
streamBinaryWriterkeystring
Clone()
public IAttribute Clone()
Returns
FromBytes(BinaryReader)
[Obsolete("Use the BinarySpanReader overload.", true)]
public void FromBytes(BinaryReader reader)
Parameters
readerBinaryReader
FromBytes(ref BinarySpanReader)
public void FromBytes(ref BinarySpanReader reader)
Parameters
readerBinarySpanReader
Remarks
Do not call this default implementation when overriding this method, it only exists for backwards compat.
GetAttributeId()
public int GetAttributeId()
Returns
ToBytes(BinaryWriter)
public void ToBytes(BinaryWriter stream)
Parameters
streamBinaryWriter