IMetabaseCustomExtender.Events

Fore Syntax

Events: IMetabaseCustomForeEvents;

Fore.NET Syntax

Events: Prognoz.Platform.Interop.Metabase.IMetabaseCustomForeEvents;

Description

The Events property returns a collection of custom events.

Comments

To work with collection of events, use the IMetabaseCustomForeEvents interface.

Fore Example

To execute the example, add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    CustomExtender: IMetabaseCustomExtender;
    Events: IMetabaseCustomForeEvents;
    ForeEvent: IMetabaseCustomForeEvent;
Begin
    MB := MetabaseClass.Active;
    //Getting a custom class container
    CustomExtender := MB.SpecialObject(MetabaseSpecialObject.CustomExtender).Edit As IMetabaseCustomExtender;
    //Getting list of events
    Events := CustomExtender.Events;
    ForeEvent := Events.FindByName("Starting download");
    //Generating event
    ForeEvent.Invoke;
End Sub UserProc;

After executing the example a custom event is generated with the Starting Download name.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Metabase;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    CustomExtender: IMetabaseCustomExtender;
    Events: IMetabaseCustomForeEvents;
    ForeEvent: IMetabaseCustomForeEvent;
Begin
    MB := Params.Metabase;
    //Getting a custom class container
    CustomExtender := MB.SpecialObject[MetabaseSpecialObject.msoCustomExtender].Edit() As IMetabaseCustomExtender;
    //Getting list of events
    Events := CustomExtender.Events;
    ForeEvent := Events.FindByName("Starting download");
    //Generating event
    ForeEvent.Invoke();
End Sub;

See also:

IMetabaseCustomExtender