Class LibraryDescription
What a referenced library declares, as a file: the types a project that references the library can name, and the members of each.
public sealed record LibraryDescription : IEquatable<LibraryDescription>
- Inheritance
-
LibraryDescription
- Implements
- Inherited Members
Remarks
A library is known by its Name and by nothing else: a project references Scripting, and the name is all that finds it, as if the
library were VBA code. Where the library came from - a type library of the machine it was described on, with the identity and version that machine's
registry gives it - is Origin, which says where a description was made and is not what finds it.
The description is a file because what a library declares is needed where the library is not: a workspace is analyzed on a machine that does not have Excel, and the symbols it needs are those of a description that ships with the platform. It is written by a tool that reads the library where it is, and by no one else; it is plain JSON (LibraryJson) so that a change to one reads as a change in review.
What it holds is what a VBA project can name: enumerations, and classes with their members and events. A type is named in a description the way VBA source names it (Type).
Properties
Classes
The classes the library declares.
public ImmutableArray<ClassDescription> Classes { get; init; }
Property Value
DependsOn
The names of the libraries whose types this one's members are declared as. They are loaded with it, whether or not a project references them: a project that references Excel can use what Excel returns.
public ImmutableArray<string> DependsOn { get; init; }
Property Value
Description
What the library says it is, in a sentence.
public string? Description { get; init; }
Property Value
Enums
The enumerations the library declares.
public ImmutableArray<EnumDescription> Enums { get; init; }
Property Value
FormatVersion
The version of the format of the file, which a reader that does not know it refuses rather than misreads.
public int FormatVersion { get; init; }
Property Value
Name
The name of the library: what a project references it by, and what qualifies the types it declares (Excel.Worksheet).
public string Name { get; init; }
Property Value
Origin
Where the description was made.
public LibraryOrigin? Origin { get; init; }