SystemAssemblyReference(Assembly: String): IForeNETSystemAssemblyReference;
Assembly is a system assembly, parameters of which are necessary to obtain.
As value of the given parameter it is necessary to specify:
Name of platform assembly (AdoMd, Andy and so on).
Full name of assembly, registered in GAC (name, version, culture, token of public key and architecture of assembly should be specified: System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL).
NOTE. Depending on assembly, certain parts in the full name may be not specified.
The path and the name of the file that contains the implementation of .NET assembly (Set in the following format: file:///<path and name of file>).
The SystemAssemblyReference property returns parameters of the link to the system assembly passed by the Assembly parameter.
As values of parameter it is possible to indicate elements of the SystemAssemblies collection.
Executing this example requires that the repository contains a .NET assembly with the NETAssembly_1 identifier.
Sub UserProc;
Var
MB: IMetabase;
NETAssembly: IForeNETAssembly;
SysAssembly: IStringList;
Reference: IForeNETSystemAssemblyReference;
i: Integer;
Begin
MB := MetabaseClass.Active;
NETAssembly := MB.ItemById("NETAssembly_1").Bind As IForeNETAssembly;
SysAssembly := NETAssembly.SystemAssemblies;
For i := 0 To SysAssembly.Count - 1 Do
Reference := ForeNETAssemblyClass.SystemAssemblyReference(SysAssembly.Item(i));
Debug.WriteLine("Assembly: "nbsp;+nbsp;Reference.AsString);
If Reference.IsFile Then
Debug.WriteLine("Path to file of external assembly: "nbsp;+nbsp;Reference.FilePath);
End If;
Debug.WriteLine("System name of assembly: " + Reference.SystemName.Name);
Debug.WriteLine("---");
End For;
End Sub UserProc;
After executing this example, the information about all system assemblies referenced by the .NET assembly, is displayed in the development environment console.
See also: