Class BlockModule
A module that a block of a source file declares (FileBlocks): Class Name ... End Class declares a class module,
Module Name ... End Module a standard module.
public sealed record BlockModule : IEquatable<BlockModule>
- Inheritance
-
BlockModule
- Implements
- Inherited Members
Remarks
A file may hold several modules in any dialect: its own module, which is what is outside every block, and one module for each block (BlockModules). The block's module has an address of its own under the file's (BlockUri(Uri, string)), which its nodes' identities are keyed by (DocumentUri). Its nodes' locations are in the file: their Uri is the file's, and their positions are the file's, so that an editor shows each where it is written.
Constructors
BlockModule(string, ModuleType, Uri, SourceRange, ModuleNode)
A module that a block of a source file declares (FileBlocks): Class Name ... End Class declares a class module,
Module Name ... End Module a standard module.
public BlockModule(string Name, ModuleType Kind, Uri Uri, SourceRange Range, ModuleNode SyntaxTree)
Parameters
NamestringThe module's name, as the block's header writes it; an
Attribute VB_Nameinside the block does not change it.KindModuleTypeThe kind of module: ClassModule for a
Classblock, StdModule for aModuleblock.UriUriThe module's address: the file's, with the module's name as one more segment (BlockUri(Uri, string)).
RangeSourceRangeWhere the block is in the file, from the start of its header to the end of its
End ClassorEnd Module.SyntaxTreeModuleNodeThe module's tree: what is between the block's header and its end, read as a module is.
Remarks
A file may hold several modules in any dialect: its own module, which is what is outside every block, and one module for each block (BlockModules). The block's module has an address of its own under the file's (BlockUri(Uri, string)), which its nodes' identities are keyed by (DocumentUri). Its nodes' locations are in the file: their Uri is the file's, and their positions are the file's, so that an editor shows each where it is written.
Properties
CreatableRange
Where the block's header writes Creatable (CreatableColumn), in the file's positions.
null when the header does not write it (IsCreatable is then false), or when the parser that
made the module does not give it.
public SourceRange? CreatableRange { get; init; }
Property Value
IsCreatable
Whether the block's header writes Creatable before Class (IsCreatable); a Module
block's never does.
public bool IsCreatable { get; init; }
Property Value
IsPartial
Whether the block's header writes Partial before its kind (IsPartial).
public bool IsPartial { get; init; }
Property Value
Kind
The kind of module: ClassModule for a Class block, StdModule for a
Module block.
public ModuleType Kind { get; init; }
Property Value
KindRange
Where the block's header writes its kind, Class or Module (KindColumn), in the file's positions:
where a finding about the module as a whole is reported. null when the parser that made the module does not give it.
public SourceRange? KindRange { get; init; }
Property Value
Name
The module's name, as the block's header writes it; an Attribute VB_Name inside the block does not change it.
public string Name { get; init; }
Property Value
NameRange
Where the block's header writes the module's name (NameColumn), in the file's positions: what a rename of the
module edits, since the file's Attribute VB_Name and the file's name are its own module's. null when the parser that
made the module does not give it.
public SourceRange? NameRange { get; init; }
Property Value
PartialRange
Where the block's header writes Partial (PartialColumn), in the file's positions.
null when the header does not write it (IsPartial is then false), or when the parser that made
the module does not give it.
public SourceRange? PartialRange { get; init; }
Property Value
Range
Where the block is in the file, from the start of its header to the end of its End Class or End Module.
public SourceRange Range { get; init; }
Property Value
SyntaxTree
The module's tree: what is between the block's header and its end, read as a module is.
public ModuleNode SyntaxTree { get; init; }
Property Value
Uri
The module's address: the file's, with the module's name as one more segment (BlockUri(Uri, string)).
public Uri Uri { get; init; }
Property Value
Visibility
The visibility the block's header states, Public or Private (Visibility); null when the header states none.
public AccessModifier? Visibility { get; init; }
Property Value
VisibilityRange
Where the block's header writes its visibility, Public or Private (VisibilityColumn), in the
file's positions. null when the header writes none (Visibility is then null too), or when the
parser that made the module does not give it.
public SourceRange? VisibilityRange { get; init; }