Table of Contents

Class AnnotationInfo

Namespace
ShadowDusk.Core
Assembly
ShadowDusk.Core.dll

A single FX annotation (a <key = value;> attached to a parameter or technique), as the MgfxWriter serializes it. Exactly one of the typed value fields is populated, selected by Type.

public sealed record AnnotationInfo : IEquatable<AnnotationInfo>
Inheritance
AnnotationInfo
Implements
Inherited Members

Constructors

AnnotationInfo(string, byte, string?, float?, int?, bool?)

A single FX annotation (a <key = value;> attached to a parameter or technique), as the MgfxWriter serializes it. Exactly one of the typed value fields is populated, selected by Type.

public AnnotationInfo(string Name, byte Type, string? StringValue, float? FloatValue, int? IntValue, bool? BoolValue)

Parameters

Name string

The annotation key.

Type byte

The MGFX EffectParameterType ordinal that tells the reader which value field to read. Only the three annotation-bearing values occur here: 2 = Int32 (read IntValue), 3 = Single/float (read FloatValue), 4 = String (read StringValue).

StringValue string

The value when Type is 4; otherwise null.

FloatValue float?

The value when Type is 3; otherwise null.

IntValue int?

The value when Type is 2; otherwise null.

BoolValue bool?

The boolean value, when applicable; otherwise null.

Properties

BoolValue

The boolean value, when applicable; otherwise null.

public bool? BoolValue { get; init; }

Property Value

bool?

FloatValue

The value when Type is 3; otherwise null.

public float? FloatValue { get; init; }

Property Value

float?

IntValue

The value when Type is 2; otherwise null.

public int? IntValue { get; init; }

Property Value

int?

Name

The annotation key.

public string Name { get; init; }

Property Value

string

StringValue

The value when Type is 4; otherwise null.

public string? StringValue { get; init; }

Property Value

string

Type

The MGFX EffectParameterType ordinal that tells the reader which value field to read. Only the three annotation-bearing values occur here: 2 = Int32 (read IntValue), 3 = Single/float (read FloatValue), 4 = String (read StringValue).

public byte Type { get; init; }

Property Value

byte