Datasnap.DSServer.TDSServerClass.OnGetClass

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type: event
Visibility: published
Source:
Datasnap.DSServer.pas
Datasnap.DSServer.hpp
Unit: Datasnap.DSServer
Parent: TDSServerClass

Delphi

property OnGetClass: TDSGetClassEvent read FGetClassEvent write FGetClassEvent;

C++

__property TDSGetClassEvent OnGetClass = {read=FGetClassEvent, write=FGetClassEvent};

Description

Specifies the server class.

Use OnGetClass to specify the server class. Setting this class is required. All public methods in this class can be called by a client. The class specified must inherit from TPersistent and be compiled with the METHODINFO directive on. This event can specify a class that extends from TRemoteDataModule to expose the providers contained in the TRemoteDataModule. TRemoteDataModule is now compiled with METHODINFO on.

When using a TPersistent descendant as a server class, the constructor will not be called because TPersistent has a nonvirtual constructor. Instead, derive the server class from TComponent, which has a virtual constructor that will be called.

To avoid errors, use TComponent instead of TPersistent as the most basic server class ancestor.

See Also