Class GenericData
Namespace: ValveResourceFormat.ResourceTypes.GenericData
Assembly: ValveResourceFormat.dll
Base class for typed game data (vdata) DATA blocks, identified by their generic_data_type value. Wraps an already-read block and exposes its parsed without re-reading it.
public abstract class GenericData : BinaryKV3Inheritance
object ← Block ← BinaryKV3 ← GenericData
Derived
Inherited Members
BinaryKV3.Type, BinaryKV3.MAGIC0, BinaryKV3.MAGIC1, BinaryKV3.MAGIC2, BinaryKV3.MAGIC3, BinaryKV3.MAGIC4, BinaryKV3.MAGIC5, BinaryKV3.IsBinaryKV3(uint), BinaryKV3.Data, BinaryKV3.Read(BinaryReader), BinaryKV3.WriteText(IndentedTextWriter), BinaryKV3.ConvertBinaryKV3ToText(nint, int), BinaryKV3.Serialize(Stream), Block.Type, Block.Offset, Block.Size, Block.Resource, Block.Read(BinaryReader), Block.ToString(), Block.WriteText(IndentedTextWriter), Block.Serialize(Stream)
Extension Methods
ResourceDataExtensions.AsKeyValueCollection(Block)
Constructors
GenericData(BinaryKV3)
Adopts the state of an already-read DATA block.
[SetsRequiredMembers]
protected GenericData(BinaryKV3 kv3)Parameters
kv3 BinaryKV3
Properties
GenericDataType
The generic_data_type value at the KV3 root of this block.
public string GenericDataType { get; }Property Value
Methods
Construct(BinaryKV3)
Constructs the typed game data block matching the generic_data_type of the given KV3 block, or null if there is no specialized type for it.
public static GenericData? Construct(BinaryKV3 kv3)Parameters
kv3 BinaryKV3
Returns
GetGenericDataType(BinaryKV3)
Reads the generic_data_type value from a KV3 block.
public static string GetGenericDataType(BinaryKV3 block)Parameters
block BinaryKV3

