Table of Contents

Class DirectoryLibrarySource

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

A source of library descriptions that is a folder of files: Scripting.json describes the library Scripting.

public sealed class DirectoryLibrarySource : ILibrarySource
Inheritance
DirectoryLibrarySource
Implements
Inherited Members

Remarks

It is the Symbols folder of the platform (Resolve(string)), where the descriptions that ship with it are deployed. A folder that is not there has no libraries, and is not an error: a platform with none to ship is a platform whose projects reference none.

Constructors

DirectoryLibrarySource(IFileSystem, string)

A source of library descriptions that is a folder of files: Scripting.json describes the library Scripting.

public DirectoryLibrarySource(IFileSystem fileSystem, string directory)

Parameters

fileSystem IFileSystem

The file system the folder is read from.

directory string

The folder.

Remarks

It is the Symbols folder of the platform (Resolve(string)), where the descriptions that ship with it are deployed. A folder that is not there has no libraries, and is not an error: a platform with none to ship is a platform whose projects reference none.

Fields

Extension

The extension of a description file.

public const string Extension = ".json"

Field Value

string

Properties

Names

The names of the libraries the source has descriptions of; none for a source that cannot say.

public IEnumerable<string> Names { get; }

Property Value

IEnumerable<string>

Methods

TryGet(string, out LibraryDescription?)

Gets the description of a library.

public bool TryGet(string name, out LibraryDescription? description)

Parameters

name string

The name of the library; the case of it does not matter, as it does not in VBA.

description LibraryDescription

The description.

Returns

bool

false when the source has no library of the name.

Exceptions

InvalidDataException

The source has one, and it cannot be read.