MakeUpToDateD(Args: IForeNETMakeArgs): DateTime;
Args. Object that contains information about assembly compilation result.
The MakeUpToDateD method checks whether the last compiled version of .NET assembly is present in the assemblies cache and performs compilation in case of its absence.
The method returns date and time of the last compilation. If any errors appear during compilation, the method returns date and time 30.12.1899 0:00:00. The list of errors is available in the Args.Messages collection.
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(True) Then
Debug.WriteLine("Yes");
NETAssembly.Run;
Elseif NETAssembly.MakeUpToDateD(Arg).Year <> 1899 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: