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