Table of Contents

Class SimDataVariant

Namespace
LlamaLogic.Packages.Models.SimData
Assembly
LlamaLogic.Packages.dll

Represents a VARIANT value: a type hash and an optional value of any SimDataType (🔒)

public sealed class SimDataVariant
Inheritance
SimDataVariant
Inherited Members

Constructors

SimDataVariant(uint)

Initializes a new SimDataVariant with the specified typeHash and no value

public SimDataVariant(uint typeHash)

Parameters

typeHash uint

SimDataVariant(uint, SimDataType, object?)

Initializes a new SimDataVariant with the specified typeHash and a value of the specified type

public SimDataVariant(uint typeHash, SimDataType type, object? value)

Parameters

typeHash uint

The type hash of the variant

type SimDataType

The type of value

value object

The value, which may be null only for STRING8, HASHEDSTRING8, VECTOR and VARIANT

Exceptions

ArgumentOutOfRangeException

type is not a defined SimDataType

ArgumentException

value is not of the .NET type SimDataObject describes for type, or is null for OBJECT

Properties

Type

Gets the type of Value, or null if the variant has no value

public SimDataType? Type { get; }

Property Value

SimDataType?

TypeHash

Gets the type hash of the variant

public uint TypeHash { get; }

Property Value

uint

Value

Gets the value of the variant (null when Type is null, and possibly when it is a type that admits null)

public object? Value { get; }

Property Value

object