IMetabase.LogonSession

Syntax

LogonSession: ILogonSession;

LogonSession: Prognoz.Platform.Interop.Metabase.ILogonSession;

Description

The LogonSession property returns information about the current session with the repository.

Example

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

Sub UserProc;
Var
    MB: IMetabase;
    LS: ILogonSession;
Begin
    MB := MetabaseClass.Active;
    LS := MB.LogonSession;
    Debug.WriteLine(LS.User.Name);
    Debug.WriteLine(LS.UserIP);
End Sub UserProc;
Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    LS: ILogonSession;
Begin
    MB := Params.Metabase;
    LS := MB.LogonSession;
    System.Diagnostics.Debug.WriteLine(LS.User.Name);
    System.Diagnostics.Debug.WriteLine(LS.UserIP);
End Sub;

 

After executing the example the name and IP-address, with which the user connected to the repository, are displayed in a development environment console.

See also:

IMetabase