Class PlatformEnvironment
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
fileSystemIFileSystemThe 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
Properties
Default
A DI-free instance for bootstrap contexts (e.g. logging configuration).
public static IPlatformEnvironment Default { get; }
Property Value
LogsDirectory
Absolute path of the platform logs directory, <Root>/Logs, created if missing.
public string LogsDirectory { get; }
Property Value
ManifestPath
Absolute path of the platform manifest, <Root>/rdcore.json.
public string ManifestPath { get; }
Property Value
Root
The platform root directory.
public string Root { get; }
Property Value
Methods
Resolve(string)
Resolves a root-relative path (either slash style) to an absolute path under Root.
public string Resolve(string rootRelativePath)