Class VBStdModuleType
Represents a standard module type.
public record VBStdModuleType : VBType, IEquatable<VBType>, IVBMemberOwnerType, IEquatable<VBStdModuleType>
- Inheritance
-
VBStdModuleType
- Implements
- Inherited Members
Remarks
Standard module public variables are statically allocated in global scope.
Constructors
VBStdModuleType(string, bool)
Represents a standard module type.
public VBStdModuleType(string Name, bool IsHidden = false)
Parameters
Remarks
Standard module public variables are statically allocated in global scope.
VBStdModuleType(string, IEnumerable<VBTypeMemberSymbol>?, bool)
Creates a new standard module type with the specified members.
public VBStdModuleType(string name, IEnumerable<VBTypeMemberSymbol>? members, bool isHidden = false)
Parameters
namestringThe identifier name of the module.
membersIEnumerable<VBTypeMemberSymbol>The member definition symbols under this module type.
isHiddenbooltrueif the module type is hidden.
Remarks
members has no default: with one it collides with the primary constructor's
(Name, IsHidden = false) for a call site giving only name — both
would be equally applicable, and the call would not compile (CS0121). Requiring
members keeps every arity unambiguous.
Properties
DefaultValue
Gets the default value for this data type.
public override VBTypedValue DefaultValue { get; }
Property Value
Remarks
⚠️ Derived types must back the implementation of this property with a thread-safe private static readonly Lazy<T>.
Failure to do so would lock up the static context initialization of the StaticSymbol symbols.
Members
Gets the members of this type.
public ImmutableArray<VBTypeMemberSymbol> Members { get; init; }
Property Value
Methods
WithMembers(IEnumerable<VBTypeMemberSymbol>)
Gets a copy of this type with the specified members.
public IVBMemberOwnerType WithMembers(IEnumerable<VBTypeMemberSymbol> members)
Parameters
membersIEnumerable<VBTypeMemberSymbol>The members of the new type.