mirror of
https://github.com/CloudDelphi/Router4Delphi.git
synced 2025-12-19 16:53:43 +01:00
Update Router4D.History.pas
This commit is contained in:
parent
d3255add17
commit
f0361612ce
@ -111,7 +111,7 @@ var
|
|||||||
begin
|
begin
|
||||||
Result := Self;
|
Result := Self;
|
||||||
if not FListCacheContainer.TryGetValue(aKey, auxObject) then
|
if not FListCacheContainer.TryGetValue(aKey, auxObject) then
|
||||||
FListCacheContainer.TryAdd(aKey, aObject);
|
FListCacheContainer.Add(aKey, aObject);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TRouter4DHistory.GetHistoryContainer(aKey: String): TFMXObject;
|
function TRouter4DHistory.GetHistoryContainer(aKey: String): TFMXObject;
|
||||||
@ -147,7 +147,7 @@ var
|
|||||||
begin
|
begin
|
||||||
Result := Self;
|
Result := Self;
|
||||||
if not FListCacheContainer.TryGetValue(aKey, auxObject) then
|
if not FListCacheContainer.TryGetValue(aKey, auxObject) then
|
||||||
FListCacheContainer.TryAdd(aKey, aObject);
|
FListCacheContainer.Add(aKey, aObject);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TRouter4DHistory.GetHistoryContainer(aKey: String): TPanel;
|
function TRouter4DHistory.GetHistoryContainer(aKey: String): TPanel;
|
||||||
@ -203,7 +203,7 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
FListCache.TryAdd(aKey, aObject);
|
FListCache.Add(aKey, aObject);
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -230,30 +230,9 @@ begin
|
|||||||
CachePersistent.FPersistentClass := aObject;
|
CachePersistent.FPersistentClass := aObject;
|
||||||
CachePersistent.FSBKey := aSBKey;
|
CachePersistent.FSBKey := aSBKey;
|
||||||
|
|
||||||
try FListCache2.TryAdd(aKey, CachePersistent); except end;
|
try FListCache2.Add(aKey, CachePersistent); except end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//procedure TRouter4DHistory.CacheKeyNotify(Sender: TObject; const Key: string;
|
|
||||||
// Action: TCollectionNotification);
|
|
||||||
//begin
|
|
||||||
// inherited;
|
|
||||||
//
|
|
||||||
// case Action of
|
|
||||||
// cnAdded:
|
|
||||||
// begin
|
|
||||||
// Self.FListCacheOrder.Add(Key);
|
|
||||||
// Self.FIndexCache := Self.FListCacheOrder.Count-1;
|
|
||||||
// end;
|
|
||||||
//
|
|
||||||
// cnRemoved:
|
|
||||||
// begin
|
|
||||||
// Self.FListCacheOrder.Remove(Key);
|
|
||||||
// Self.FIndexCache := Self.FListCacheOrder.Count-1;
|
|
||||||
// end;
|
|
||||||
// end;
|
|
||||||
//
|
|
||||||
//end;
|
|
||||||
|
|
||||||
constructor TRouter4DHistory.Create;
|
constructor TRouter4DHistory.Create;
|
||||||
begin
|
begin
|
||||||
FListCache := TObjectDictionary<String, TObject>.Create;
|
FListCache := TObjectDictionary<String, TObject>.Create;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user