IForeNETRuntime.SystemAssembly

Syntax

SystemAssembly(Name: String): IForeNETRuntimeAssembly;

Parameters

Name.System assembly, context of which must be received.

As value of the given parameter it is necessary to specify:

NOTE. Depending on assembly, certain parts in the full name may be not specified.

Description

The SystemAssembly property returns the context of specified system .NET assembly.

Comments

When the context of .NET assembly is received, it becomes possible to use its resources. All types, described in assembly, and forms, that are created within assembly, are accessed through the assembly context.

Example

Sub UserProc;
Var
    Run: IForeNETRuntime;
    Asm: IForeNETRuntimeAssembly;
    Typ: IForeNETRuntimeType;
    TypInst: IForeNETRuntimeObjectInstance;
Begin
    Run := ForeNETAssemblyClass.Runtime;
    Asm := Run.SystemAssembly("System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
    Typ := Asm.Type("System.Drawing.Font");
    TypInst := Typ.CreateInstanceVar("Arial"14);
End Sub UserProc;

On executing the example the context of the System.Drawing assembly is received. The System.Drawing.Font type, that is used to create of different fonts, is received from this assembly. The copy of object of the given type with the specified parameters of font is created. Further, this object can be used to determine the font of various .NET components, or in cases that require arguments with System.Drawing.Font type.

See also:

IForeNETRuntime