2016-12-05 15:50:00 +01:00
|
|
|
unit MemoryWebSessionController;
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
uses classes, MVCFramework.Session;
|
|
|
|
|
|
|
|
type
|
2023-09-07 18:13:23 +02:00
|
|
|
TWebSessionMemoryController = class(TMVCWebSessionMemory)
|
2016-12-05 15:50:00 +01:00
|
|
|
private
|
|
|
|
FList: TStringList;
|
|
|
|
public
|
|
|
|
constructor Create(const SessionID: string; const Timeout: UInt64); override;
|
|
|
|
destructor Destroy; override;
|
|
|
|
property List: TStringList read FList;
|
|
|
|
end;
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
{ TWebSessionMemoryController }
|
|
|
|
|
|
|
|
constructor TWebSessionMemoryController.Create(const SessionID: string; const Timeout: UInt64);
|
|
|
|
begin
|
|
|
|
inherited Create(SessionID, Timeout);
|
|
|
|
FList := TStringList.Create;
|
|
|
|
end;
|
|
|
|
|
|
|
|
destructor TWebSessionMemoryController.Destroy;
|
|
|
|
begin
|
|
|
|
FList.Free;
|
|
|
|
inherited;
|
|
|
|
end;
|
|
|
|
|
|
|
|
initialization
|
|
|
|
|
|
|
|
TMVCSessionFactory.GetInstance.RegisterSessionType('memoryController', TWebSessionMemoryController);
|
|
|
|
|
|
|
|
end.
|