Ignore:
Timestamp:
Sep 9, 2022, 8:20:25 PM (2 years ago)
Author:
chronos
Message:
  • Modified: Removed TemplateGenerics package. Generics usage replaced by standard Generics.Collections.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/PersistentData/Backend/UPDClientMemory.pas

    r137 r138  
    44
    55uses
    6   Classes, SysUtils, UPDClient, SpecializedList;
     6  Classes, SysUtils, UPDClient, Generics.Collections;
    77
    88type
     
    1919    function SearchObject(Id: Integer): TObjectProxy;
    2020  public
    21     Objects: TListObject;
     21    Objects: TObjectList<TObjectProxy>;
    2222    procedure ObjectLoad(AObject: TObjectProxy); override;
    2323    procedure ObjectSave(AObject: TObjectProxy); override;
     
    9696    else begin
    9797      AObject.Id := GetNewObjectId;
    98       Obj := TObjectProxy(Objects.AddNew(TObjectProxy.Create));
     98      Obj := TObjectProxy(Objects.Add(TObjectProxy.Create));
    9999      Obj.Assign(AObject);
    100100    end;
     
    118118  NewObject: TObjectProxy;
    119119  Table: string;
     120  Item: TPair<string, string>;
    120121begin
    121122  AList.Objects.Clear;
     
    131132
    132133      if AList.ColummsFilterUse then begin
    133         for P := 0 to Properties.Count - 1 do
    134         if AList.ColumnsFilter.IndexOf(Properties.Keys[I]) <> -1 then
    135           NewObject.Properties.Add(Properties.Keys[I], Properties[I].Value);
     134        for Item in Properties do
     135        if AList.ColumnsFilter.IndexOf(Item.Key) <> -1 then
     136          NewObject.Properties.Add(Item.Key, Item.Value);
    136137      end else NewObject.Properties.Assign(Properties);
    137138    end;
     
    172173begin
    173174  inherited;
    174   Objects := TListObject.Create;
     175  Objects := TObjectList<TObjectProxy>.Create;
    175176  BackendName := 'Memory';
    176177end;
Note: See TracChangeset for help on using the changeset viewer.