Table of Contents

Class AxolotlPackageManager

Namespace
Axolotl2D.Packages
Assembly
Axolotl2D.dll

Explicitly mounts validated packages and only then loads permitted module code.

public sealed class AxolotlPackageManager : IDisposable
Inheritance
AxolotlPackageManager
Implements
Inherited Members

Constructors

AxolotlPackageManager(IServiceProvider, AssetLoaderRegistry, AxolotlModuleRegistry, PrefabComponentRegistry)

Explicitly mounts validated packages and only then loads permitted module code.

public AxolotlPackageManager(IServiceProvider services, AssetLoaderRegistry loaders, AxolotlModuleRegistry modules, PrefabComponentRegistry prefabs)

Parameters

services IServiceProvider
loaders AssetLoaderRegistry
modules AxolotlModuleRegistry
prefabs PrefabComponentRegistry

Properties

MountedPackages

The packages explicitly mounted in this manager.

public IReadOnlyCollection<MountedAxolotlPackage> MountedPackages { get; }

Property Value

IReadOnlyCollection<MountedAxolotlPackage>

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Get(string)

Gets an explicitly mounted package by ID.

public MountedAxolotlPackage Get(string packageId)

Parameters

packageId string

Returns

MountedAxolotlPackage

LoadAsync(string, PackageTrustPolicy, CancellationToken)

Validates and mounts a package, loading code only when the policy permits it.

public ValueTask<MountedAxolotlPackage> LoadAsync(string path, PackageTrustPolicy trustPolicy, CancellationToken cancellationToken = default)

Parameters

path string
trustPolicy PackageTrustPolicy
cancellationToken CancellationToken

Returns

ValueTask<MountedAxolotlPackage>