Table of Contents

Class RuntimeEnvironmentProfile

Namespace
RDCore.SDK.Runtime
Assembly
RDCore.SDK.dll

The default IRuntimeEnvironmentProfile implementation.

public sealed record RuntimeEnvironmentProfile : IRuntimeEnvironmentProfile, IEquatable<RuntimeEnvironmentProfile>
Inheritance
RuntimeEnvironmentProfile
Implements
Inherited Members

Constructors

RuntimeEnvironmentProfile(bool, int, int, bool, OptionCompare, VBErlLineNumbering, bool, SupportedLanguage?)

The default IRuntimeEnvironmentProfile implementation.

public RuntimeEnvironmentProfile(bool Is64Bit, int Lcid, int AnsiCodePage, bool SupportsOptionCompareDatabase, OptionCompare DatabaseCompare = OptionCompare.Text, VBErlLineNumbering ErlLineNumbering = VBErlLineNumbering.DocumentLine, bool AllowDllImports = true, SupportedLanguage? SourceLanguage = null)

Parameters

Is64Bit bool

Whether the environment is 64-bit.

Lcid int

The environment LCID; 0 for the invariant locale.

AnsiCodePage int

The ANSI code page for Byte() ↔ String.

SupportsOptionCompareDatabase bool

Whether Option Compare Database is supported.

DatabaseCompare OptionCompare

The comparison mode Option Compare Database stands for; Text unless said otherwise.

ErlLineNumbering VBErlLineNumbering

What Erl counts as a line; the document line unless said otherwise.

AllowDllImports bool

Whether a Declare'd library import may be called; true unless said otherwise.

SourceLanguage SupportedLanguage

The language the code is written in; RD-VBA unless said otherwise.

Properties

AllowDllImports

Whether a Declare'd library import may be called; true unless said otherwise.

public bool AllowDllImports { get; init; }

Property Value

bool

AnsiCodePage

The ANSI code page for Byte() ↔ String.

public int AnsiCodePage { get; init; }

Property Value

int

Culture

The CultureInfo for Lcid — drives Option Compare Text, Like, Format$, and number / date let-coercion to and from String.

public CultureInfo Culture { get; }

Property Value

CultureInfo

DatabaseCompare

The comparison mode Option Compare Database stands for; Text unless said otherwise.

public OptionCompare DatabaseCompare { get; init; }

Property Value

OptionCompare

Default

A 64-bit, current-culture, Windows-1252, no-Option Compare Database profile for design-time and tests.

public static IRuntimeEnvironmentProfile Default { get; }

Property Value

IRuntimeEnvironmentProfile

ErlLineNumbering

What Erl counts as a line; the document line unless said otherwise.

public VBErlLineNumbering ErlLineNumbering { get; init; }

Property Value

VBErlLineNumbering

Is64Bit

Whether the environment is 64-bit.

public bool Is64Bit { get; init; }

Property Value

bool

Language

The language the code is written in: what the environment is a dialect of, and so which symbols and statements exist at all.

public SupportedLanguage Language { get; }

Property Value

SupportedLanguage

Remarks

👉 RD-VBA unless the workspace says otherwise. It is not derivable from the source, which is why it is a fact of the environment.

Lcid

The environment LCID; 0 for the invariant locale.

public int Lcid { get; init; }

Property Value

int

SourceLanguage

The language the code is written in; RD-VBA unless said otherwise.

public SupportedLanguage? SourceLanguage { get; init; }

Property Value

SupportedLanguage

SupportsOptionCompareDatabase

Whether Option Compare Database is supported.

public bool SupportsOptionCompareDatabase { get; init; }

Property Value

bool

Methods

From(SdkEnvironmentOptions, SupportedLanguage?)

Builds a profile from bound appsettings.json options, for code written in language.

public static RuntimeEnvironmentProfile From(SdkEnvironmentOptions options, SupportedLanguage? language = null)

Parameters

options SdkEnvironmentOptions
language SupportedLanguage

Returns

RuntimeEnvironmentProfile