Class SandboxType
public sealed record SandboxType : IEquatable<SandboxType>
- Inheritance
-
SandboxType
- Implements
- Inherited Members
Constructors
SandboxType(string, IReadOnlyList<SandboxType>)
public SandboxType(string Name, IReadOnlyList<SandboxType> Arguments)
Parameters
NamestringArgumentsIReadOnlyList<SandboxType>
Fields
RecordName
public const string RecordName = "Record"
Field Value
Properties
Arguments
public IReadOnlyList<SandboxType> Arguments { get; init; }
Property Value
Bool
public static SandboxType Bool { get; }
Property Value
F64
public static SandboxType F64 { get; }
Property Value
Guid
public static SandboxType Guid { get; }
Property Value
I32
public static SandboxType I32 { get; }
Property Value
I64
public static SandboxType I64 { get; }
Property Value
IsRecord
public bool IsRecord { get; }
Property Value
Name
public string Name { get; init; }
Property Value
SandboxPath
public static SandboxType SandboxPath { get; }
Property Value
SandboxUri
public static SandboxType SandboxUri { get; }
Property Value
String
public static SandboxType String { get; }
Property Value
Unit
public static SandboxType Unit { get; }
Property Value
Methods
Equals(SandboxType?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(SandboxType? other)
Parameters
otherSandboxTypeAn object to compare with this object.
Returns
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
IsForbiddenName(string)
public static bool IsForbiddenName(string name)
Parameters
namestring
Returns
IsKnown(IReadOnlySet<string>, int)
public bool IsKnown(IReadOnlySet<string> declaredOpaqueIdTypes, int maxDepth = 8)
Parameters
declaredOpaqueIdTypesIReadOnlySet<string>maxDepthint
Returns
IsKnown(int)
public bool IsKnown(int maxDepth = 8)
Parameters
maxDepthint
Returns
IsKnownBuiltIn(int)
public bool IsKnownBuiltIn(int maxDepth = 8)
Parameters
maxDepthint
Returns
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
namestring
Returns
IsValidMapKey()
public bool IsValidMapKey()
Returns
IsValidMapKey(IReadOnlySet<string>?)
public bool IsValidMapKey(IReadOnlySet<string>? declaredOpaqueIdTypes)
Parameters
declaredOpaqueIdTypesIReadOnlySet<string>
Returns
IsWellFormedOpaqueIdName(string)
public static bool IsWellFormedOpaqueIdName(string name)
Parameters
namestring
Returns
List(SandboxType)
public static SandboxType List(SandboxType item)
Parameters
itemSandboxType
Returns
Map(SandboxType, SandboxType)
public static SandboxType Map(SandboxType key, SandboxType value)
Parameters
keySandboxTypevalueSandboxType
Returns
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
fieldsIReadOnlyList<SandboxType>
Returns
Scalar(string)
public static SandboxType Scalar(string name)
Parameters
namestring
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.