ResolveAssembly(AssemblyName: String): IForeAssemblyBinary;
AssemblyName. Assembly which presence is to be checked.
The ResolveAssembly method checks whether the specified assembly is in the repository.
If assembly exists, the method returns its metadata. For further work with assembly and its structures, use the IForeRuntime.BindToAssembly method.
Executing the example requires that repository contains an assembly with the ASSM_TEST identifier.
Add a link to the Fore, Metabase system assembly.
Sub UserProc;
Var
ForeService: IForeServices;
Runtime: IForeRuntime;
AssmBin: IForeAssemblyBinary;
Begin
ForeService := MetabaseClass.Active As IForeServices;
Runtime := ForeService.GetRuntime;
//Obtained assembly metadata
AssmBin := Runtime.ResolveAssembly("ASSM_TEST");
//View assembly metadata
Debug.WriteLine("System assembly: " + AssmBin.Builtin.ToString);
Debug.WriteLine("Loaded: " + AssmBin.IsLoaded.ToString);
Debug.WriteLine("Assembly name: " + AssmBin.Name);
Debug.WriteLine("Namespace: " + AssmBin.Namespace_);
Debug.WriteLine("Source object/file: " + AssmBin.ObjectName);
Debug.WriteLine("Links to other assemblies: " + AssmBin.References);
Debug.WriteLine("Date and time of the last launch: " + AssmBin.TimeStamp.ToString);
Debug.WriteLine("Version: " + AssmBin.Version.ToString);
End Sub UserProc;
On executing the example, the repository assembly with the specified identifier will be loaded to the execution environment. Assembly metadata will be displayed to the development environment console.
See also: