Table of Contents

Class SupportedLanguages

Namespace
RDCore.SDK.Workspace
Assembly
RDCore.SDK.Protocols.dll

The languages the platform serves.

public static class SupportedLanguages
Inheritance
SupportedLanguages
Inherited Members

Properties

All

Every language the platform serves.

public static IReadOnlyList<SupportedLanguage> All { get; }

Property Value

IReadOnlyList<SupportedLanguage>

BASIC

The platform's BASIC, which an interactive shell is written in.

public static SupportedLanguage BASIC { get; }

Property Value

SupportedLanguage

Remarks

Its source is a .rdc file: a program of the shell, a text file of lines. It is not a .bas, which is a module of the BASIC of Visual Basic (a file with procedures in it, and a header), which this is not. The modules of a workspace the shell opens are RD-VBA's (ModuleFileTypes): standard modules (.bas), class modules (.cls), UserForms (.frm) and document modules (.doccls). The code of an RDForms form (.rdform) is not one of them.

RDVBA

RD-VBA: the platform's own implementation of MS-VBAL, and the default.

public static SupportedLanguage RDVBA { get; }

Property Value

SupportedLanguage

Remarks

Its modules are standard modules (.bas), class modules (.cls), UserForms (.frm), document modules (.doccls), and the code of RDForms forms (.rdform, RDFormsModuleExtension), whose RDForms document (.xaml) is not a module.

VB6

VB6.

public static SupportedLanguage VB6 { get; }

Property Value

SupportedLanguage

Remarks

Its modules are standard modules (.bas), class modules (.cls), and designed modules: forms (.frm), UserControls (.ctl), PropertyPages (.pag) and UserDocuments (.dob). The code of a UserControl, a PropertyPage or a UserDocument is built on the class its designer block names (FormDescriptor.BaseClass). A Designer (.dsr) is not a module: its designer's objects are in its binary .dsx. A form ported to RDForms is the code of an RDForms form (.rdform, RDFormsModuleExtension), whose RDForms document (.xaml) is not a module.

VBScript

VBScript: Microsoft Visual Basic Scripting Edition, as Windows Script Host runs it.

public static SupportedLanguage VBScript { get; }

Property Value

SupportedLanguage

Remarks

Its source is a script (.vbs): a text file with no header. A project of the language references the two libraries of Windows Script Host without its project file listing them: IHost, the type library of wscript.exe, whose WScript object every script names, and IWshRuntimeLibrary (Windows Script Host Object Model, wshom.ocx), whose WshShell a script creates with CreateObject("WScript.Shell"). A project of another language that has a script references them too, after the references its project file lists (TrailingImplicitReferencesOf(IEnumerable<string?>)). Its statements outside procedures are the script, which a run runs from its first line to its last (HasFileLevelStatements).

Methods

Get(string?)

The language with the given identifier.

public static SupportedLanguage Get(string? id)

Parameters

id string

The identifier, as Id.

Returns

SupportedLanguage

Exceptions

InvalidOperationException

The platform serves no such language.

OfProject(RDCoreProject)

The language a project says it is written in: VB6 for a project imported from a Visual Basic 6 project (SourceProject, a .vbp), and VBScript for a project whose modules are all scripts (.vbs).

public static SupportedLanguage? OfProject(RDCoreProject project)

Parameters

project RDCoreProject

The project.

Returns

SupportedLanguage

The language, or null when the project says none.

Remarks

A server takes it when its client names no language in the initializationOptions of its initialize request (RDCoreInitializationOptions.Language): what the client names wins. Any other project says no language, and the server's own setting stands.

TryGet(string?, out SupportedLanguage)

The language with the given identifier.

public static bool TryGet(string? id, out SupportedLanguage language)

Parameters

id string

The identifier, as Id; compared without regard to case.

language SupportedLanguage

The language, when there is one by that identifier.

Returns

bool

false when the platform serves no such language.