program Project2;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils,
System.Generics.Collections;
type
TUpdateProcedure =
procedure of object;
TUpdateProcedures = TArray<TUpdateProcedure>;
IModelUpdater =
interface
['
{DB8D4B0F-31EA-4A93-AA06-E49FFA71BA47}']
end;
TReloAdapter =
class(TInterfacedObject, IModelUpdater)
private
UpdateViewProcedures: TUpdateProcedures;
procedure UpdateView001;
procedure UpdateView002;
public
constructor Create;
end;
var
ReloAdapter: TReloAdapter;
constructor TReloAdapter.Create;
var
UpdateProcedureList: TList<TUpdateProcedure>;
begin
UpdateProcedureList:= TList<TUpdateProcedure>.Create();
UpdateProcedureList.AddRange([UpdateView001, UpdateView002]);
UpdateViewProcedures := UpdateProcedureList.ToArray;
UpdateProcedureList.Free;
end;
procedure TReloAdapter.UpdateView001;
begin
end;
procedure TReloAdapter.UpdateView002;
begin
end;
begin
try
ReloAdapter := TReloAdapter.Create;
except
on E:
Exception do
Writeln(E.ClassName, '
: ', E.
Message);
end;
end.