Class DocumentModuleFact
What a document module is (ModuleKinds): the code of a host's document, which RD-VBA analyzes and does not host. Its code that presumes the
host - a member of the host's class it names, a handler of the host's events - is code to move into a class that holds the document in a WithEvents
variable, from an application the program automates.
public sealed record DocumentModuleFact : IEquatable<DocumentModuleFact>
- Inheritance
-
DocumentModuleFact
- Implements
- Inherited Members
Constructors
DocumentModuleFact(DocumentHostClass?, Uri?, ImmutableArray<string>)
What a document module is (ModuleKinds): the code of a host's document, which RD-VBA analyzes and does not host. Its code that presumes the
host - a member of the host's class it names, a handler of the host's events - is code to move into a class that holds the document in a WithEvents
variable, from an application the program automates.
public DocumentModuleFact(DocumentHostClass? HostClass, Uri? HostClassUri, ImmutableArray<string> HostEvents)
Parameters
HostClassDocumentHostClassThe class of the host library its document is an object of; null for a host RD-VBA does not know.
HostClassUriUriThe address of that class, which the members it has are addressed under; null when the project does not reference its library, and when the host is not known.
HostEventsImmutableArray<string>The names of the events of the host's class, which a procedure named
Worksheet_Changeis named as a handler of.
Properties
HandlerPrefix
The prefix of the name of a procedure that MS-VBA's host calls when its document raises an event: the host class's name and an underscore
(Worksheet_, Workbook_, Document_, Form_); null for a host RD-VBA does not know.
public string? HandlerPrefix { get; }
Property Value
HostClass
The class of the host library its document is an object of; null for a host RD-VBA does not know.
public DocumentHostClass? HostClass { get; init; }
Property Value
HostClassUri
The address of that class, which the members it has are addressed under; null when the project does not reference its library, and when the host is not known.
public Uri? HostClassUri { get; init; }
Property Value
HostEvents
The names of the events of the host's class, which a procedure named Worksheet_Change is named as a handler of.
public ImmutableArray<string> HostEvents { get; init; }
Property Value
Methods
Of(VBClassModuleSymbol, ISymbolResolver)
What a document module is, as the composition has its host.
public static DocumentModuleFact? Of(VBClassModuleSymbol module, ISymbolResolver resolver)
Parameters
moduleVBClassModuleSymbolThe module.
resolverISymbolResolverThe resolver its host's class is found by.
Returns
- DocumentModuleFact
The fact; null for a module that is no document module.