Table of Contents

Class SandboxType

Namespace
DotBoxD.Kernels.Sandbox
Assembly
DotBoxD.Kernels.dll
public sealed record SandboxType : IEquatable<SandboxType>
Inheritance
SandboxType
Implements
Inherited Members

Constructors

SandboxType(string, IReadOnlyList<SandboxType>)

public SandboxType(string Name, IReadOnlyList<SandboxType> Arguments)

Parameters

Name string
Arguments IReadOnlyList<SandboxType>

Fields

RecordName

public const string RecordName = "Record"

Field Value

string

Properties

Arguments

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

Property Value

IReadOnlyList<SandboxType>

Bool

public static SandboxType Bool { get; }

Property Value

SandboxType

F64

public static SandboxType F64 { get; }

Property Value

SandboxType

Guid

public static SandboxType Guid { get; }

Property Value

SandboxType

I32

public static SandboxType I32 { get; }

Property Value

SandboxType

I64

public static SandboxType I64 { get; }

Property Value

SandboxType

IsRecord

public bool IsRecord { get; }

Property Value

bool

Name

public string Name { get; init; }

Property Value

string

SandboxPath

public static SandboxType SandboxPath { get; }

Property Value

SandboxType

SandboxUri

public static SandboxType SandboxUri { get; }

Property Value

SandboxType

String

public static SandboxType String { get; }

Property Value

SandboxType

Unit

public static SandboxType Unit { get; }

Property Value

SandboxType

Methods

Equals(SandboxType?)

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

public bool Equals(SandboxType? other)

Parameters

other SandboxType

An object to compare with this object.

Returns

bool

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

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

IsForbidden()

public bool IsForbidden()

Returns

bool

IsForbiddenName(string)

public static bool IsForbiddenName(string name)

Parameters

name string

Returns

bool

IsKnown(IReadOnlySet<string>, int)

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

Parameters

declaredOpaqueIdTypes IReadOnlySet<string>
maxDepth int

Returns

bool

IsKnown(int)

public bool IsKnown(int maxDepth = 8)

Parameters

maxDepth int

Returns

bool

IsKnownBuiltIn(int)

public bool IsKnownBuiltIn(int maxDepth = 8)

Parameters

maxDepth int

Returns

bool

IsKnownOpaqueId(string)

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)

Parameters

name string

Returns

bool

IsValidMapKey()

public bool IsValidMapKey()

Returns

bool

IsValidMapKey(IReadOnlySet<string>?)

public bool IsValidMapKey(IReadOnlySet<string>? declaredOpaqueIdTypes)

Parameters

declaredOpaqueIdTypes IReadOnlySet<string>

Returns

bool

IsWellFormedOpaqueIdName(string)

public static bool IsWellFormedOpaqueIdName(string name)

Parameters

name string

Returns

bool

List(SandboxType)

public static SandboxType List(SandboxType item)

Parameters

item SandboxType

Returns

SandboxType

Map(SandboxType, SandboxType)

public static SandboxType Map(SandboxType key, SandboxType value)

Parameters

key SandboxType
value SandboxType

Returns

SandboxType

Record(IReadOnlyList<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)

Parameters

fields IReadOnlyList<SandboxType>

Returns

SandboxType

Scalar(string)

public static SandboxType Scalar(string name)

Parameters

name string

Returns

SandboxType

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.