IForeNETAssembly.IsUpToDate

Syntax

IsUpToDate(Recursive: Boolean): Boolean;

Parameters

Recursive. Parameter, that determines whether presence of the last compiled versions of assemblies, connected to the given .NET assembly, is checked.

If the True value is passed, the presence of the last compiled version of current .NET assembly and of all assemblies, connected to the current one, is checked. If the False value is passed, the presence of the last compiled version of the current .NET assembly only is checked.

Description

The IsUpToDate method checks whether the last compiled version of .NET assembly is present in the assemblies cache.

Comments

The method returns True if the last compiled version of .NET assembly is present in the cache.

Example

Executing this example requires that the repository contains a .NET assembly with the NETAssembly_1 identifier.

Sub UserProc;
Var
    MB: IMetabase;
    NETAssembly: IForeNETAssembly;
    Arg: IForeNETMakeArgs;
    s: String;
Begin
    MB := MetabaseClass.Active;
    NETAssembly := MB.ItemById("NETAssembly_1").Bind As IForeNETAssembly;
    Arg := NETAssembly.CreateMakeArgs;
    Arg.Messages := New StringList.Create;
    If NETAssembly.IsUpToDate(TrueThen
        NETAssembly.Run;
    Elseif NETAssembly.MakeUpToDate(Arg) Then
        NETAssembly.Run;
    Else
        For Each s In Arg.Messages Do
            Debug.WriteLine(s);
        End For;
    End If;
End Sub UserProc;

After executing this example it is checked if cache contains assemblies of the last compiled version of specified .NET assembly. If the latest version is present, the assembly is run from assemblies cache. If the latest version is absent, the compilation of .NET assembly and all assemblies associated with it is performed. If the compilation was successful the assembly is run, otherwise information about compilation errors is displayed in the development environment console.

See also:

IForeNETAssembly