mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 15:55:54 +01:00
fixes to correct compile in Delphi Tokyo and Rio
This commit is contained in:
parent
4929253007
commit
7dc71dea5d
@ -84,7 +84,10 @@ uses
|
||||
function TMVCCache.SetValue(const AName: string; const AValue: TValue): TMVCCacheItem;
|
||||
var
|
||||
lCacheItem: TMVCCacheItem;
|
||||
Value: TValue;
|
||||
begin
|
||||
Value := AValue;
|
||||
|
||||
FMREW.DoWithWriteLock(
|
||||
procedure
|
||||
var
|
||||
@ -92,13 +95,13 @@ begin
|
||||
begin
|
||||
if FStorage.TryGetValue(AName, lItem) then
|
||||
begin
|
||||
lItem.Value := AValue;
|
||||
lItem.Value := Value;
|
||||
end
|
||||
else
|
||||
begin
|
||||
lCacheItem := TMVCCacheItem.Create;
|
||||
try
|
||||
lCacheItem.Value := AValue;
|
||||
lCacheItem.Value := Value;
|
||||
FStorage.Add(AName, lCacheItem);
|
||||
except
|
||||
lCacheItem.Free;
|
||||
|
@ -231,7 +231,12 @@ end;
|
||||
|
||||
procedure TMVCAbstractSerializer.RegisterTypeSerializer(const ATypeInfo: PTypeInfo; AInstance: IMVCTypeSerializer);
|
||||
begin
|
||||
{$IFDEF NEXTGEN}
|
||||
LogD('Registering TypeSerializer for: ' + PChar(Pointer(ATypeInfo.Name)));
|
||||
{$ELSE}
|
||||
LogD('Registering TypeSerializer for: ' + string(ATypeInfo.Name));
|
||||
{$ENDIF}
|
||||
|
||||
FTypeSerializers.AddOrSetValue(ATypeInfo, AInstance);
|
||||
end;
|
||||
|
||||
|
@ -366,7 +366,7 @@ begin
|
||||
ftFMTBcd, ftBCD:
|
||||
AJsonObject.F[FieldName] := BcdToDouble(ADataSet.Fields[I].AsBcd);
|
||||
|
||||
ftGraphic, ftBlob, ftStream:
|
||||
ftGraphic, ftBlob, ftStream, ftOraBlob:
|
||||
begin
|
||||
MS := TMemoryStream.Create;
|
||||
try
|
||||
@ -1085,7 +1085,11 @@ begin
|
||||
end;
|
||||
tkFloat:
|
||||
begin
|
||||
{$IFDEF NEXTGEN}
|
||||
if PChar(Pointer(Value.TypeInfo.Name)) = 'TDate' then
|
||||
{$ELSE}
|
||||
if Value.TypeInfo.Name = 'TDate' then
|
||||
{$ENDIF}
|
||||
begin
|
||||
JSON.DUtc[KeyName] := Value.AsExtended;
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user