mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 15:55:54 +01:00
81744b892e
Some refactoring needed to be coherent to the rest of the framework Added a new sample to chow customsession utilization
38 lines
792 B
ObjectPascal
38 lines
792 B
ObjectPascal
unit MemoryWebSessionController;
|
|
|
|
interface
|
|
|
|
uses classes, MVCFramework.Session;
|
|
|
|
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;
|
|
|
|
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.
|