Vixen
02b45cc4
csharp
public record class LibraryValue

A compile-time value, rendered as text with the type that says how to read it back.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Text rather than a boxed object, for the reason .rvnfx's permutation key already records: a boxed value survives System.Text.Json as a JsonElement and stops comparing equal to what went in, which would make a round-trip quietly lossy. The kind sits beside it, so nothing is lost by writing the value the way source spells it.

Fields and properties (2)

  • public string Kind

    How to parse : bool, int, uint, float or double.

  • public string Text

    The value, invariant-culture and round-trippable.

Methods (3)

  • public LibraryValue(string Kind, string Text)

    A compile-time value, rendered as text with the type that says how to read it back.

  • public static LibraryValue? From(object? value)

    Encodes a boxed constant, or null when there is nothing to encode.

  • public object? ToObject()

    Decodes back to the boxed constant, or null when the text does not parse.

Used by (9)

  • BodyDecoderVixen.Raven
  • BuilderVixen.Raven
  • CompiledLibraryTestsVixen.Raven.Tests
  • LibraryFieldVixen.Raven
  • LibraryIrConstantVixen.Raven
  • LibraryIrEncoderVixen.Raven
  • LibraryParameterVixen.Raven
  • MetadataFieldSymbolVixen.Raven
  • MetadataParameterSymbolVixen.Raven