Table of Contents

Class PlatformEnvironment

Namespace
RDCore.SDK.Platform
Assembly
RDCore.SDK.dll

Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.

public sealed class PlatformEnvironment : IPlatformEnvironment
Inheritance
PlatformEnvironment
Implements
Inherited Members

Constructors

PlatformEnvironment(IFileSystem)

Creates a platform environment, deriving Root from RootEnvironmentVariable when set, otherwise from the process base directory.

public PlatformEnvironment(IFileSystem fileSystem)

Parameters

fileSystem IFileSystem

The file system abstraction used to resolve and create paths.

Fields

RootEnvironmentVariable

Name of the environment variable that overrides the derived root. Set on the entry process; inherited by spawned children.

public const string RootEnvironmentVariable = "RDCORE_PLATFORM_ROOT"

Field Value

string

Properties

Default

A DI-free instance for bootstrap contexts (e.g. logging configuration).

public static IPlatformEnvironment Default { get; }

Property Value

IPlatformEnvironment

LogsDirectory

Absolute path of the platform logs directory, <Root>/Logs, created if missing.

public string LogsDirectory { get; }

Property Value

string

ManifestPath

Absolute path of the platform manifest, <Root>/rdcore.json.

public string ManifestPath { get; }

Property Value

string

Root

The platform root directory.

public string Root { get; }

Property Value

string

Methods

Resolve(string)

Resolves a root-relative path (either slash style) to an absolute path under Root.

public string Resolve(string rootRelativePath)

Parameters

rootRelativePath string

A path relative to Root, using either / or </code>.

Returns

string