IModule.Standalone

Syntax

Standalone: Boolean;

Description

The Standalone property returns whether the object is present in the assembly.

Comments

If a module/form is included in any assembly, the property returns False and it is possible to get a description of parent assembly in the ParentAssembly property.

If a module/form is not included in assembly they implement temporary assembly. In this case this property returns True and parameters of temporary assembly are available in the Assembly property.

Example

Executing the example requires that the repository contains a module with the TestModule identifier.

Sub Main;
Var
    MB: IMetabase;
    Module: IModule;
Begin
    MB := MetabaseClass.Active;
    Module := MB.ItemById("TestModule").Bind As IModule;
    If Not Module.Standalone Then
        Debug.WriteLine("Parent assembly: " + Module.ParentAssembly.Id);
        Debug.WriteLine("References of parent assembly: " + (Module.ParentAssembly.Bind As IAssembly).References);
    Else
        Debug.WriteLine("Module is not included in any repository assembly");
        Debug.WriteLine("Module references: " + Module.Assembly.References);
    End If;
End Sub Main;

After executing this example the development environment console displays information about module is displayed: parent assembly existence and connected assemblies.

See also:

IModule