System.Rtti.TInterceptBeforeNotify
Delphi
TInterceptBeforeNotify = reference to procedure(Instance: TObject;
Method: TRttiMethod; const Args: TArray<TValue>; out DoInvoke: Boolean;
out Result: TValue);
C++
__interface TInterceptBeforeNotify : public System::IInterface
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
anonMethod class |
public | System.Rtti.pas System.Rtti.hpp |
System.Rtti | System.Rtti |
Description
This is the type of the System.Rtti.TVirtualMethodInterceptor.OnBefore event handler procedure.
Use TInterceptAfterNotify to implement the OnBefore event handler to inhibit invocation of an inherited method.
Set DoInvoke
to False to inhibit invocation of the inherited virtual method, or to True (default) to let invocation proceed.
Args
is the list of arguments passed to the virtual method.
Values
in this array may be modified to change the arguments passed to the inherited implementation.
Method
is the RTTI object corresponding to the virtual method invoked on the instance.
In the case where DoInvoke is set to False (so the inherited implementation is suppressed), Result
should be set to the desired return value of the method. Its default value is TValue.Empty, which will convert to 0, nil, '', or the corresponding empty value of the return type.
Instance
is the instance on which a virtual method was called.