Class SandboxPolicy
Namespace: DotBoxD.Kernels
Assembly: DotBoxD.Kernels.dll
public sealed record SandboxPolicy : IEquatable<SandboxPolicy>Inheritance
Section titled “Inheritance”Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
Section titled “Constructors”SandboxPolicy(string, SandboxEffect, IReadOnlyList<CapabilityGrant>, ResourceLimits, bool, DateTimeOffset?, ulong?, IReadOnlySet<string>?)
Section titled “ SandboxPolicy(string, SandboxEffect, IReadOnlyList<CapabilityGrant>, ResourceLimits, bool, DateTimeOffset?, ulong?, IReadOnlySet<string>?)”public SandboxPolicy(string PolicyId, SandboxEffect AllowedEffects, IReadOnlyList<CapabilityGrant> Grants, ResourceLimits ResourceLimits, bool Deterministic = false, DateTimeOffset? LogicalNow = null, ulong? RandomSeed = null, IReadOnlySet<string>? DeclaredOpaqueIdTypes = null)Parameters
Section titled “Parameters”PolicyId string
AllowedEffects SandboxEffect
Grants IReadOnlyList<CapabilityGrant>
ResourceLimits ResourceLimits
Deterministic bool
LogicalNow DateTimeOffset?
RandomSeed ulong?
DeclaredOpaqueIdTypes IReadOnlySet<string>?
Properties
Section titled “Properties”AllowedEffects
Section titled “ AllowedEffects”public SandboxEffect AllowedEffects { get; init; }Property Value
Section titled “Property Value”DeclaredOpaqueIdTypes
Section titled “ DeclaredOpaqueIdTypes”Host-declared opaque-id brand type names this policy permits a module to use, in type or literal position. Empty by default (fail-closed): a module that references an opaque-id brand the host did not declare fails validation with E-POLICY-OPAQUE-ID.
public IReadOnlySet<string> DeclaredOpaqueIdTypes { get; init; }Property Value
Section titled “Property Value”Deterministic
Section titled “ Deterministic”public bool Deterministic { get; init; }Property Value
Section titled “Property Value”GrantClock
Section titled “ GrantClock”public DateTimeOffset GrantClock { get; }Property Value
Section titled “Property Value”Grants
Section titled “ Grants”public IReadOnlyList<CapabilityGrant> Grants { get; init; }Property Value
Section titled “Property Value”IReadOnlyList<CapabilityGrant>
public string Hash { get; }Property Value
Section titled “Property Value”LogicalNow
Section titled “ LogicalNow”public DateTimeOffset? LogicalNow { get; init; }Property Value
Section titled “Property Value”PolicyId
Section titled “ PolicyId”public string PolicyId { get; init; }Property Value
Section titled “Property Value”RandomSeed
Section titled “ RandomSeed”public ulong? RandomSeed { get; init; }Property Value
Section titled “Property Value”ResourceLimits
Section titled “ ResourceLimits”public ResourceLimits ResourceLimits { get; init; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”GetGrant(string)
Section titled “ GetGrant(string)”public CapabilityGrant GetGrant(string capabilityId)Parameters
Section titled “Parameters”capabilityId string
Returns
Section titled “Returns”GrantsCapability(string)
Section titled “ GrantsCapability(string)”public bool GrantsCapability(string capabilityId)Parameters
Section titled “Parameters”capabilityId string
Returns
Section titled “Returns”GrantsCapability(string, DateTimeOffset)
Section titled “ GrantsCapability(string, DateTimeOffset)”public bool GrantsCapability(string capabilityId, DateTimeOffset now)Parameters
Section titled “Parameters”capabilityId string
now DateTimeOffset
Returns
Section titled “Returns”TryGetGrant(string, out CapabilityGrant)
Section titled “ TryGetGrant(string, out CapabilityGrant)”public bool TryGetGrant(string capabilityId, out CapabilityGrant grant)Parameters
Section titled “Parameters”capabilityId string
grant CapabilityGrant