Browse Source

* Implemented TPAramDef.Assign, or streaming does not work correctly

git-svn-id: trunk@15378 -
michael 15 years ago
parent
commit
cd237186be
1 changed files with 19 additions and 0 deletions
  1. 19 0
      packages/fcl-web/src/jsonrpc/fpjsonrpc.pp

+ 19 - 0
packages/fcl-web/src/jsonrpc/fpjsonrpc.pp

@@ -24,6 +24,7 @@ Type
     procedure SetName(const AValue: TJSONStringType);
   public
     Constructor Create(ACollection : TCollection); override;
+    Procedure Assign(Source : TPersistent); override;
   Published
     Property Name : TJSONStringType Read FName Write SetName;
     Property DataType : TJSONtype Read FType Write FType default jtString;
@@ -91,6 +92,7 @@ Type
     Property AfterExecute;
     Property OnParamError;
     Property Options;
+    Property ParamDefs;
   end;
 
   { TJSONRPCEcho }
@@ -427,6 +429,23 @@ begin
   FRequired:=True;
 end;
 
+procedure TJSONParamDef.Assign(Source: TPersistent);
+
+Var
+  P : TJSONParamDef;
+
+begin
+  If Source is TJSONParamDef then
+    begin
+    P:=TJSONParamDef(Source);
+    FType:=P.DataType;
+    FName:=P.Name;
+    FRequired:=P.Required;
+    end
+  else
+    inherited Assign(Source);
+end;
+
 { TJSONParamDefs }
 
 function TJSONParamDefs.GetP(AIndex : Integer): TJSONParamDef;