BindToProperty(PropertyName: String): IForeProperty;
PropertyName. Custom property name.
The BindToProperty method returns information about the specified property.
The method returns Null if the property with the specified name in the current structure is not found.
Executing the example requires that the repository contains an assembly with the ASSM_TEST identifier. The assembly implements the CCalculate class, the class has the Tag property.
Add a link to the Fore, Metabase system assembly.
Sub UserProc;
Var
ForeService: IForeServices;
Runtime: IForeRuntime;
Assm: IForeAssembly;
FClass: IForeClass;
FProp: IForeProperty;
Begin
ForeService := MetabaseClass.Active As IForeServices;
Runtime := ForeService.GetRuntime;
// Load assembly
Assm := Runtime.BindToAssembly("ASSM_TEST");
// Get information about class properties
FClass := Assm.BindToClass("CCalculate");
// Get property
FProp := FClass.BindToProperty("Tag");
Debug.WriteLine("Property: " + FProp.Name);
Debug.WriteLine("Method that implements Get part: " + FProp.NameOfGetMethod);
Debug.WriteLineIf(FProp.NameOfSetMethod <> "", "Method that implements Set part: " + FProp.NameOfSetMethod);
End Sub UserProc;
On executing the example, the repository assembly with the specified identifier will be loaded to the execution environment. The access to the specified property will be obtained in the assembly. Information about Get and Set parts will be displayed in the development environment console.
See also: