#1 2015-03-13 10:14:03

jaclas
Member
Registered: 2014-09-12
Posts: 215

TSQLRestServer.ServiceRegister and ContractExpected parameter

Class TSQLRestServer has three methods of registering services:

    function ServiceRegister(aImplementationClass: TInterfacedClass;   const aInterfaces: array of PTypeInfo;
      aInstanceCreation: TServiceInstanceImplementation=sicSingle): TServiceFactoryServer; overload; virtual;

    function ServiceRegister(aSharedImplementation: TInterfacedObject;  const aInterfaces: array of PTypeInfo): TServiceFactoryServer; overload; virtual;

    function ServiceRegister(aClient: TSQLRest; const aInterfaces: array of PTypeInfo;  aInstanceCreation: TServiceInstanceImplementation=sicSingle;
      const aContractExpected: RawUTF8=''): boolean; overload; virtual;

But only one of these methods allows specify a parameter: aContractExpected

Is possible to add aContractExpected parameter to second method too (with aSharedImplementation: TInterfacedObject parameter)?

In this way:

    function ServiceRegister(aSharedImplementation: TInterfacedObject;  const aInterfaces: array of PTypeInfo; 
                                        const aContractExpected: RawUTF8=''): TServiceFactoryServer; overload; virtual;

best regards

Offline

#2 2015-03-13 10:32:56

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,662
Website

Re: TSQLRestServer.ServiceRegister and ContractExpected parameter

I've added aContractExpected optional parameter to ServiceRegister() and ServiceDefine() methods.
See http://synopse.info/fossil/info/4daa1c78ef

Offline

#3 2015-03-13 22:49:52

jaclas
Member
Registered: 2014-09-12
Posts: 215

Re: TSQLRestServer.ServiceRegister and ContractExpected parameter

Thx! :-)

Offline

Board footer

Powered by FluxBB