Skip to content

KernelAPI reference

Class PlatformCatalog

Namespace: MicroEngine.Core
Assembly: MicroEngine.dll
Guide: Backends and platforms

The platforms a host can choose from, in order of preference: the first one that can run here is the default. Hosts select by name (a –platform argument, a setting), never game code.

C#
public sealed class PlatformCatalog

Inheritance

object ← PlatformCatalog

Constructors

PlatformCatalog()

C#
public PlatformCatalog()

Properties

Default

The first registered profile that can run in this process.

C#
public PlatformProfile Default { get; }

Property Value

PlatformProfile

Exceptions

PlatformConfigurationException

No profile is registered, or none can run here.

Profiles

The registered profiles in order of preference.

C#
public IReadOnlyList<PlatformProfile> Profiles { get; }

Property Value

IReadOnlyList<PlatformProfile>

Methods

Add(PlatformProfile)

Registers a profile after the existing ones.

C#
public PlatformCatalog Add(PlatformProfile profile)

Parameters

profile PlatformProfile

Returns

PlatformCatalog

This catalog, for chaining.

Exceptions

ArgumentException

A profile with the same name (ignoring case) is already registered.

Find(string)

The profile named name (ignoring case), or null.

C#
public PlatformProfile? Find(string name)

Parameters

name string

Returns

PlatformProfile?

Resolve(string?)

The named profile, or Default for null or empty.

C#
public PlatformProfile Resolve(string? name)

Parameters

name string?

Returns

PlatformProfile

Exceptions

PlatformConfigurationException

No profile has that name, or it cannot run here.