Skip to content

Class SandboxType

Namespace: DotBoxD.Kernels.Sandbox
Assembly: DotBoxD.Kernels.dll

public sealed record SandboxType : IEquatable<SandboxType>

objectSandboxType

IEquatable<SandboxType>

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

SandboxType(string, IReadOnlyList<SandboxType>)

Section titled “ SandboxType(string, IReadOnlyList<SandboxType>)”
public SandboxType(string Name, IReadOnlyList<SandboxType> Arguments)

Name string

Arguments IReadOnlyList<SandboxType>

public const string RecordName = "Record"

string

public IReadOnlyList<SandboxType> Arguments { get; init; }

IReadOnlyList<SandboxType>

public static SandboxType Bool { get; }

SandboxType

public static SandboxType F64 { get; }

SandboxType

public static SandboxType Guid { get; }

SandboxType

public static SandboxType I32 { get; }

SandboxType

public static SandboxType I64 { get; }

SandboxType

public bool IsRecord { get; }

bool

public string Name { get; init; }

string

public static SandboxType SandboxPath { get; }

SandboxType

public static SandboxType SandboxUri { get; }

SandboxType

public static SandboxType String { get; }

SandboxType

public static SandboxType Unit { get; }

SandboxType

Indicates whether the current object is equal to another object of the same type.

public bool Equals(SandboxType? other)

other SandboxType?

An object to compare with this object.

bool

true if the current object is equal to the other parameter; otherwise, false.

Serves as the default hash function.

public override int GetHashCode()

int

A hash code for the current object.

public bool IsForbidden()

bool

public static bool IsForbiddenName(string? name)

name string?

bool

public bool IsKnown(int maxDepth = 8)

maxDepth int

bool

public bool IsKnown(IReadOnlySet<string> declaredOpaqueIdTypes, int maxDepth = 8)

declaredOpaqueIdTypes IReadOnlySet<string>

maxDepth int

bool

public bool IsKnownBuiltIn(int maxDepth = 8)

maxDepth int

bool

Structural predicate: a name denotes an opaque-id brand when it is a well-formed identifier that is not a built-in scalar, not a collection constructor, and not a forbidden CLR-shaped name. Whether a given brand is permitted for a particular run is a host/policy decision (see SandboxPolicy.DeclaredOpaqueIdTypes), not a structural one.

public static bool IsKnownOpaqueId(string name)

name string

bool

public bool IsValidMapKey()

bool

public bool IsValidMapKey(IReadOnlySet<string>? declaredOpaqueIdTypes)

declaredOpaqueIdTypes IReadOnlySet<string>?

bool

public static bool IsWellFormedOpaqueIdName(string name)

name string

bool

public static SandboxType List(SandboxType item)

item SandboxType

SandboxType

public static SandboxType Map(SandboxType key, SandboxType value)

key SandboxType

value SandboxType

SandboxType

A composite record/object type: an ordered, positional list of field types (≥ 1). Field names are not part of the structural type — the analyzer and the host marshaling layer map fields to a C# DTO’s declared member order. Records can nest (a field may itself be a record, list, or map).

public static SandboxType Record(IReadOnlyList<SandboxType> fields)

fields IReadOnlyList<SandboxType>

SandboxType

public static SandboxType Scalar(string name)

name string

SandboxType

Returns a string that represents the current object.

public override string ToString()

string

A string that represents the current object.