diff --git a/wst/trunk/base_service_intf.pas b/wst/trunk/base_service_intf.pas index e154ad1cd..5e9bb024a 100644 --- a/wst/trunk/base_service_intf.pas +++ b/wst/trunk/base_service_intf.pas @@ -1470,7 +1470,7 @@ type { TSimpleItemFactory } {$TYPEINFO ON} - TSimpleItemFactory = class(TInterfacedObject,IInterface,IItemFactory) + TSimpleItemFactory = class(TInterfacedObject,IItemFactory) private FItemClass : TSimpleFactoryItemClass; protected @@ -1520,7 +1520,7 @@ type { TSimpleItemFactoryEx } - TSimpleItemFactoryEx = class(TSimpleItemFactory,IInterface,IItemFactory,IItemFactoryEx) + TSimpleItemFactoryEx = class(TSimpleItemFactory,IItemFactory,IItemFactoryEx) private FPooled: Boolean; FPoolMax: Integer; @@ -2957,9 +2957,9 @@ begin Exit; i := FPropertyNames.Add(s); if ( s = '' ) then - FProperties.Add(TPublishedPropertyManager.Create(Self) as IInterface) + FProperties.Add(TPublishedPropertyManager.Create(Self)) else - FProperties.Add(TStoredPropertyManager.Create() as IInterface); + FProperties.Add(TStoredPropertyManager.Create()); end; Result := FProperties.Get(i) as IPropertyManager; end; @@ -3116,7 +3116,7 @@ constructor TSimpleCallContext.Create(); begin FHeaderList := TObjectList.Create(False); FFreeObjectList := TObjectList.Create(True); - FPropertyManager := TStoredPropertyManager.Create() as IPropertyManager; + FPropertyManager := TStoredPropertyManager.Create(); end; destructor TSimpleCallContext.Destroy(); diff --git a/wst/trunk/binary_formatter.pas b/wst/trunk/binary_formatter.pas index ec9548ad1..a8361a878 100644 --- a/wst/trunk/binary_formatter.pas +++ b/wst/trunk/binary_formatter.pas @@ -188,8 +188,8 @@ procedure RegisterBinaryProtocol(); begin GetFormaterRegistry().Register( sPROTOCOL_NAME, - TSimpleItemFactory.Create(TBinaryFormatter) as IItemFactory, - TSimpleItemFactory.Create(TBinaryCallMaker) as IItemFactory + TSimpleItemFactory.Create(TBinaryFormatter), + TSimpleItemFactory.Create(TBinaryCallMaker) ); end; diff --git a/wst/trunk/binary_streamer.pas b/wst/trunk/binary_streamer.pas index dc6ef7df9..1cdc46aed 100644 --- a/wst/trunk/binary_streamer.pas +++ b/wst/trunk/binary_streamer.pas @@ -288,12 +288,12 @@ Type function CreateBinaryWriter(AStream : TStream):IDataStore; begin - Result := TDataStore.Create(AStream) As IDataStore; + Result := TDataStore.Create(AStream); end; function CreateBinaryReader(AStream : TStream):IDataStoreReader; begin - Result := TDataStoreReader.Create(AStream) As IDataStoreReader; + Result := TDataStoreReader.Create(AStream); end; { TDataStore } diff --git a/wst/trunk/client_filters.pas b/wst/trunk/client_filters.pas index 4d0ca7941..e2b61ee01 100644 --- a/wst/trunk/client_filters.pas +++ b/wst/trunk/client_filters.pas @@ -54,7 +54,7 @@ implementation procedure RegisterLogFilter(); begin GetDataFilterRegistry().Register( - LOG_FILTER_NAME,TSimpleItemFactory.Create(TLogFilter) as IItemFactory + LOG_FILTER_NAME,TSimpleItemFactory.Create(TLogFilter) ); end; diff --git a/wst/trunk/file_logger_extension.pas b/wst/trunk/file_logger_extension.pas index a823053cf..56359ea0d 100644 --- a/wst/trunk/file_logger_extension.pas +++ b/wst/trunk/file_logger_extension.pas @@ -65,7 +65,7 @@ end; initialization StreamInstanceLock := TCriticalSection.Create(); - GetServiceExtensionRegistry().Register('TFileLoggerServiceExtension',TSimpleItemFactory.Create(TFileLoggerServiceExtension) as IItemFactory); + GetServiceExtensionRegistry().Register('TFileLoggerServiceExtension',TSimpleItemFactory.Create(TFileLoggerServiceExtension)); finalization FreeAndNil(StreamInstance); diff --git a/wst/trunk/filter_intf.pas b/wst/trunk/filter_intf.pas index 26f226360..3000d13a0 100644 --- a/wst/trunk/filter_intf.pas +++ b/wst/trunk/filter_intf.pas @@ -95,7 +95,7 @@ type { TDataFilterRegistry } - TDataFilterRegistry = class(TBaseFactoryRegistry,IInterface,IDataFilterRegistry) + TDataFilterRegistry = class(TBaseFactoryRegistry,IDataFilterRegistry) protected function Find( const AName : string; @@ -121,7 +121,7 @@ var function GetDataFilterRegistry():IDataFilterRegistry; begin if not Assigned(DataFilterRegistryInst) then - DataFilterRegistryInst := TDataFilterRegistry.Create() as IDataFilterRegistry;// Lock!!! + DataFilterRegistryInst := TDataFilterRegistry.Create();// Lock!!! Result := DataFilterRegistryInst; end; diff --git a/wst/trunk/fpc_http_protocol.pas b/wst/trunk/fpc_http_protocol.pas index 61691ca56..7ea6a1b3d 100644 --- a/wst/trunk/fpc_http_protocol.pas +++ b/wst/trunk/fpc_http_protocol.pas @@ -162,7 +162,7 @@ end; procedure FPC_RegisterHTTP_Transport(); begin - GetTransportRegistry().Register(sTRANSPORT_NAME,TSimpleItemFactory.Create(THTTPTransport) as IItemFactory); + GetTransportRegistry().Register(sTRANSPORT_NAME,TSimpleItemFactory.Create(THTTPTransport)); end; { TFPCCookieManager } diff --git a/wst/trunk/fpc_http_server.pas b/wst/trunk/fpc_http_server.pas index 720b8756f..5058d80d3 100644 --- a/wst/trunk/fpc_http_server.pas +++ b/wst/trunk/fpc_http_server.pas @@ -149,7 +149,7 @@ end; constructor TServerListnerThread.Create(AWorkerObject : TFPWorkerObject); begin FreeOnTerminate := True; - FWorkerObject := AWorkerObject as IObjectRef; + FWorkerObject := AWorkerObject; inherited Create(False); end; @@ -342,7 +342,7 @@ constructor TwstFPHttpListener.Create( begin inherited Create(); - FWorkerObjectRef := TFPWorkerObject.Create() as IObjectRef; + FWorkerObjectRef := TFPWorkerObject.Create(); FWorkerObject := TFPWorkerObject(FWorkerObjectRef.GetObject()); FWorkerObject.RootAddress := AServerIpAddress; FWorkerObject.ServerSoftware := AServerSoftware; diff --git a/wst/trunk/fpc_tcp_protocol.pas b/wst/trunk/fpc_tcp_protocol.pas index ef0ee5601..308c7013f 100644 --- a/wst/trunk/fpc_tcp_protocol.pas +++ b/wst/trunk/fpc_tcp_protocol.pas @@ -121,7 +121,7 @@ end; procedure FPC_RegisterTCP_Transport(); begin - GetTransportRegistry().Register(sTRANSPORT_NAME,TSimpleItemFactory.Create(TTCPTransport) as IItemFactory); + GetTransportRegistry().Register(sTRANSPORT_NAME,TSimpleItemFactory.Create(TTCPTransport)); end; end. diff --git a/wst/trunk/ics_http_protocol.pas b/wst/trunk/ics_http_protocol.pas index 6e0151e83..516c77279 100644 --- a/wst/trunk/ics_http_protocol.pas +++ b/wst/trunk/ics_http_protocol.pas @@ -198,7 +198,7 @@ end; procedure ICS_RegisterHTTP_Transport(); begin - GetTransportRegistry().Register(sTRANSPORT_NAME,TSimpleItemFactory.Create(THTTPTransport) as IItemFactory); + GetTransportRegistry().Register(sTRANSPORT_NAME,TSimpleItemFactory.Create(THTTPTransport)); end; end. diff --git a/wst/trunk/ics_tcp_protocol.pas b/wst/trunk/ics_tcp_protocol.pas index e151807f7..e13377dae 100644 --- a/wst/trunk/ics_tcp_protocol.pas +++ b/wst/trunk/ics_tcp_protocol.pas @@ -219,7 +219,7 @@ end; procedure ICS_RegisterTCP_Transport(); begin - GetTransportRegistry().Register(sTRANSPORT_NAME,TSimpleItemFactory.Create(TTCPTransport) as IItemFactory); + GetTransportRegistry().Register(sTRANSPORT_NAME,TSimpleItemFactory.Create(TTCPTransport)); end; end. diff --git a/wst/trunk/imp_utils.pas b/wst/trunk/imp_utils.pas index f2cb009ef..14fc9eef5 100644 --- a/wst/trunk/imp_utils.pas +++ b/wst/trunk/imp_utils.pas @@ -403,7 +403,7 @@ begin FParent := AParent; FHandleUnknownProps := AHandleUnknownProps; if FHandleUnknownProps then - FUnknownProps := TStoredPropertyManager.Create() as IPropertyManager; + FUnknownProps := TStoredPropertyManager.Create(); end; diff --git a/wst/trunk/indy_http_protocol.pas b/wst/trunk/indy_http_protocol.pas index ace8c5d3d..42cf5b8c0 100644 --- a/wst/trunk/indy_http_protocol.pas +++ b/wst/trunk/indy_http_protocol.pas @@ -244,7 +244,7 @@ end; procedure INDY_RegisterHTTP_Transport(); begin - GetTransportRegistry().Register(sTRANSPORT_NAME,TSimpleItemFactory.Create(THTTPTransport) as IItemFactory); + GetTransportRegistry().Register(sTRANSPORT_NAME,TSimpleItemFactory.Create(THTTPTransport)); end; diff --git a/wst/trunk/indy_tcp_protocol.pas b/wst/trunk/indy_tcp_protocol.pas index c91c5412c..0bd36d5ee 100644 --- a/wst/trunk/indy_tcp_protocol.pas +++ b/wst/trunk/indy_tcp_protocol.pas @@ -160,7 +160,7 @@ end; procedure INDY_RegisterTCP_Transport(); begin - GetTransportRegistry().Register(sTRANSPORT_NAME,TSimpleItemFactory.Create(TTCPTransport) as IItemFactory); + GetTransportRegistry().Register(sTRANSPORT_NAME,TSimpleItemFactory.Create(TTCPTransport)); end; end. diff --git a/wst/trunk/json_formatter.pas b/wst/trunk/json_formatter.pas index b3df5b67a..4467474ff 100644 --- a/wst/trunk/json_formatter.pas +++ b/wst/trunk/json_formatter.pas @@ -267,8 +267,8 @@ procedure RegisterJsonProtocol(); begin GetFormaterRegistry().Register( s_json, - TSimpleItemFactory.Create(TJsonRpcFormatter) as IItemFactory, - TSimpleItemFactory.Create(TJsonRpcCallMaker) as IItemFactory + TSimpleItemFactory.Create(TJsonRpcFormatter), + TSimpleItemFactory.Create(TJsonRpcCallMaker) ); end; diff --git a/wst/trunk/library_protocol.pas b/wst/trunk/library_protocol.pas index 21fc13f52..be9a6bba6 100644 --- a/wst/trunk/library_protocol.pas +++ b/wst/trunk/library_protocol.pas @@ -152,7 +152,7 @@ end; procedure LIB_Register_Transport(); begin - GetTransportRegistry().Register(sTRANSPORT_NAME,TSimpleItemFactory.Create(TLIBTransport) as IItemFactory); + GetTransportRegistry().Register(sTRANSPORT_NAME,TSimpleItemFactory.Create(TLIBTransport)); end; end. diff --git a/wst/trunk/logger_extension.pas b/wst/trunk/logger_extension.pas index 09af75b9b..f2076c773 100644 --- a/wst/trunk/logger_extension.pas +++ b/wst/trunk/logger_extension.pas @@ -104,6 +104,6 @@ begin end; initialization - GetServiceExtensionRegistry().Register('TLoggerServiceExtension',TSimpleItemFactory.Create(TLoggerServiceExtension) as IItemFactory); + GetServiceExtensionRegistry().Register('TLoggerServiceExtension',TSimpleItemFactory.Create(TLoggerServiceExtension)); end. diff --git a/wst/trunk/metadata_repository.pas b/wst/trunk/metadata_repository.pas index 91d26e45e..a8240d645 100644 --- a/wst/trunk/metadata_repository.pas +++ b/wst/trunk/metadata_repository.pas @@ -517,7 +517,7 @@ type { TModuleMetadataMngr } - TModuleMetadataMngr = class(TInterfacedObject,IInterface,IModuleMetadataMngr) + TModuleMetadataMngr = class(TInterfacedObject,IModuleMetadataMngr) private FList : TStringList; FRepositories : array of PServiceRepository; @@ -563,7 +563,7 @@ var function GetModuleMetadataMngr():IModuleMetadataMngr; begin if not Assigned(ModuleMetadataMngrInst) then - ModuleMetadataMngrInst := TModuleMetadataMngr.Create() as IModuleMetadataMngr; + ModuleMetadataMngrInst := TModuleMetadataMngr.Create(); Result := ModuleMetadataMngrInst; end; diff --git a/wst/trunk/metadata_service_binder.pas b/wst/trunk/metadata_service_binder.pas index 8b83d5875..1a834b278 100644 --- a/wst/trunk/metadata_service_binder.pas +++ b/wst/trunk/metadata_service_binder.pas @@ -52,7 +52,7 @@ begin Fillchar(returnVal,SizeOf(TArrayOfStringRemotable),#0); - tmpObj := Self.GetFactory().CreateInstance() as IWSTMetadataService; + tmpObj := GetFactory().CreateInstance() as IWSTMetadataService; if Supports(tmpObj,ICallControl,cllCntrl) then cllCntrl.SetCallContext(callCtx); hasObjCntrl := Supports(tmpObj,IObjectControl,objCntrl); @@ -74,7 +74,7 @@ begin finally if hasObjCntrl then objCntrl.Deactivate(); - Self.GetFactory().ReleaseInstance(tmpObj); + GetFactory().ReleaseInstance(tmpObj); end; end; @@ -95,7 +95,7 @@ begin locStrPrmName := 'AName'; AFormatter.Get(TypeInfo(String),locStrPrmName,AName); - tmpObj := Self.GetFactory().CreateInstance() as IWSTMetadataService; + tmpObj := GetFactory().CreateInstance() as IWSTMetadataService; if Supports(tmpObj,ICallControl,cllCntrl) then cllCntrl.SetCallContext(callCtx); hasObjCntrl := Supports(tmpObj,IObjectControl,objCntrl); @@ -117,7 +117,7 @@ begin finally if hasObjCntrl then objCntrl.Deactivate(); - Self.GetFactory().ReleaseInstance(tmpObj); + GetFactory().ReleaseInstance(tmpObj); end; end; @@ -139,7 +139,7 @@ end; constructor TWSTMetadataService_ServiceBinderFactory.Create(); begin - FInstance := TWSTMetadataService_ServiceBinder.Create() as IInterface; + FInstance := TWSTMetadataService_ServiceBinder.Create(); end; destructor TWSTMetadataService_ServiceBinderFactory.Destroy(); @@ -151,7 +151,7 @@ end; procedure Server_service_RegisterWSTMetadataServiceService(); Begin - GetServerServiceRegistry().Register('IWSTMetadataService',TWSTMetadataService_ServiceBinderFactory.Create() as IItemFactory); + GetServerServiceRegistry().Register('IWSTMetadataService',TWSTMetadataService_ServiceBinderFactory.Create()); End; initialization diff --git a/wst/trunk/metadata_service_imp.pas b/wst/trunk/metadata_service_imp.pas index 4dd0f1e50..17a0d9660 100644 --- a/wst/trunk/metadata_service_imp.pas +++ b/wst/trunk/metadata_service_imp.pas @@ -135,7 +135,7 @@ End; procedure RegisterWSTMetadataServiceImplementationFactory(); Begin - GetServiceImplementationRegistry().Register('IWSTMetadataService',TImplementationFactory.Create(TWSTMetadataService_ServiceImp) as IServiceImplementationFactory); + GetServiceImplementationRegistry().Register('IWSTMetadataService',TImplementationFactory.Create(TWSTMetadataService_ServiceImp)); End; End. diff --git a/wst/trunk/metadata_service_proxy.pas b/wst/trunk/metadata_service_proxy.pas index 01de9fc3b..66eef5c98 100644 --- a/wst/trunk/metadata_service_proxy.pas +++ b/wst/trunk/metadata_service_proxy.pas @@ -49,18 +49,16 @@ end; function TWSTMetadataService_Proxy.GetRepositoryList():TArrayOfStringRemotable; Var locSerializer : IFormatterClient; - locCallContext : ICallContext; locStrPrmName : string; Begin - locCallContext := Self as ICallContext; locSerializer := GetSerializer(); Try - locSerializer.BeginCall('GetRepositoryList', GetTarget(),locCallContext); + locSerializer.BeginCall('GetRepositoryList', GetTarget(),Self); locSerializer.EndCall(); MakeCall(); - locSerializer.BeginCallRead(locCallContext); + locSerializer.BeginCallRead(Self); TObject(Result) := Nil; locStrPrmName := 'Result'; locSerializer.Get(TypeInfo(TArrayOfStringRemotable), locStrPrmName, Result); @@ -75,19 +73,17 @@ function TWSTMetadataService_Proxy.GetRepositoryInfo( ):TWSTMtdRepository; Var locSerializer : IFormatterClient; - locCallContext : ICallContext; locStrPrmName : string; Begin - locCallContext := Self as ICallContext; locSerializer := GetSerializer(); Try - locSerializer.BeginCall('GetRepositoryInfo', GetTarget(),locCallContext); + locSerializer.BeginCall('GetRepositoryInfo', GetTarget(),Self); locSerializer.Put('AName', TypeInfo(String), AName); locSerializer.EndCall(); MakeCall(); - locSerializer.BeginCallRead(locCallContext); + locSerializer.BeginCallRead(Self); TObject(Result) := Nil; locStrPrmName := 'Result'; locSerializer.Get(TypeInfo(TWSTMtdRepository), locStrPrmName, Result); diff --git a/wst/trunk/metadata_wsdl.pas b/wst/trunk/metadata_wsdl.pas index 166d936be..45a16e9a2 100644 --- a/wst/trunk/metadata_wsdl.pas +++ b/wst/trunk/metadata_wsdl.pas @@ -185,7 +185,7 @@ type { TWsdlTypeHandlerRegistry } - TWsdlTypeHandlerRegistry = class(TBaseFactoryRegistry,IInterface,IWsdlTypeHandlerRegistry) + TWsdlTypeHandlerRegistry = class(TBaseFactoryRegistry,IWsdlTypeHandlerRegistry) private FTypeRegistry : TTypeRegistry; FDefaultHandlerTable : Array[TTypeKind] of IItemFactory; @@ -894,7 +894,7 @@ end; function CreateWsdlTypeHandlerRegistry(ATypeRegistry : TTypeRegistry):IWsdlTypeHandlerRegistry; begin - Result := TWsdlTypeHandlerRegistry.Create(ATypeRegistry) as IWsdlTypeHandlerRegistry; + Result := TWsdlTypeHandlerRegistry.Create(ATypeRegistry); end; procedure RegisterFondamentalTypesHandler(ARegistry : IWsdlTypeHandlerRegistry); @@ -902,49 +902,49 @@ var r : IWsdlTypeHandlerRegistry; begin r := ARegistry; - r.RegisterDefaultHandler(tkInteger,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory); - r.RegisterDefaultHandler(tkInt64,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory); + r.RegisterDefaultHandler(tkInteger,TSimpleItemFactory.Create(TFakeTypeHandler)); + r.RegisterDefaultHandler(tkInt64,TSimpleItemFactory.Create(TFakeTypeHandler)); {$IFDEF FPC} - r.RegisterDefaultHandler(tkQWord,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory); - r.RegisterDefaultHandler(tkSString,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory); - r.RegisterDefaultHandler(tkAString,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory); - r.RegisterDefaultHandler(tkBool,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory); + r.RegisterDefaultHandler(tkQWord,TSimpleItemFactory.Create(TFakeTypeHandler)); + r.RegisterDefaultHandler(tkSString,TSimpleItemFactory.Create(TFakeTypeHandler)); + r.RegisterDefaultHandler(tkAString,TSimpleItemFactory.Create(TFakeTypeHandler)); + r.RegisterDefaultHandler(tkBool,TSimpleItemFactory.Create(TFakeTypeHandler)); {$ENDIF} - r.RegisterDefaultHandler(tkLString,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory); - r.RegisterDefaultHandler(tkWString,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory); + r.RegisterDefaultHandler(tkLString,TSimpleItemFactory.Create(TFakeTypeHandler)); + r.RegisterDefaultHandler(tkWString,TSimpleItemFactory.Create(TFakeTypeHandler)); - r.RegisterDefaultHandler(tkWString,TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory); + r.RegisterDefaultHandler(tkWString,TSimpleItemFactory.Create(TFakeTypeHandler)); - r.RegisterDefaultHandler(tkEnumeration,TSimpleItemFactory.Create(TEnumTypeHandler) as IItemFactory); + r.RegisterDefaultHandler(tkEnumeration,TSimpleItemFactory.Create(TEnumTypeHandler)); - r.RegisterDefaultHandler(tkClass,TSimpleItemFactory.Create(TBaseComplexRemotable_TypeHandler) as IItemFactory); + r.RegisterDefaultHandler(tkClass,TSimpleItemFactory.Create(TBaseComplexRemotable_TypeHandler)); - r.Register('TBaseArrayRemotable',TSimpleItemFactory.Create(TBaseArrayRemotable_TypeHandler) as IItemFactory); + r.Register('TBaseArrayRemotable',TSimpleItemFactory.Create(TBaseArrayRemotable_TypeHandler)); - r.RegisterDefaultHandler(tkRecord,TSimpleItemFactory.Create(TRecord_TypeHandler) as IItemFactory); + r.RegisterDefaultHandler(tkRecord,TSimpleItemFactory.Create(TRecord_TypeHandler)); -{ r.Register('Integer',TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory); - r.Register('LongWord',TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory); +{ r.Register('Integer',TSimpleItemFactory.Create(TFakeTypeHandler)); + r.Register('LongWord',TSimpleItemFactory.Create(TFakeTypeHandler)); - r.Register('string',TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory); - r.Register('shortstring',TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory); - r.Register('ansistring',TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory); - r.Register('boolean',TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory); + r.Register('string',TSimpleItemFactory.Create(TFakeTypeHandler)); + r.Register('shortstring',TSimpleItemFactory.Create(TFakeTypeHandler)); + r.Register('ansistring',TSimpleItemFactory.Create(TFakeTypeHandler)); + r.Register('boolean',TSimpleItemFactory.Create(TFakeTypeHandler)); - r.Register('Byte',TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory); - r.Register('ShortInt',TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory); - r.Register('Word',TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory); - r.Register('SmallInt',TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory); - r.Register('Int64',TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory); - r.Register('QWord',TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory); + r.Register('Byte',TSimpleItemFactory.Create(TFakeTypeHandler)); + r.Register('ShortInt',TSimpleItemFactory.Create(TFakeTypeHandler)); + r.Register('Word',TSimpleItemFactory.Create(TFakeTypeHandler)); + r.Register('SmallInt',TSimpleItemFactory.Create(TFakeTypeHandler)); + r.Register('Int64',TSimpleItemFactory.Create(TFakeTypeHandler)); + r.Register('QWord',TSimpleItemFactory.Create(TFakeTypeHandler)); - r.Register('Single',TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory); - r.Register('Currency',TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory); - r.Register('Comp',TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory); - r.Register('Double',TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory); - r.Register('Extended',TSimpleItemFactory.Create(TFakeTypeHandler) as IItemFactory); + r.Register('Single',TSimpleItemFactory.Create(TFakeTypeHandler)); + r.Register('Currency',TSimpleItemFactory.Create(TFakeTypeHandler)); + r.Register('Comp',TSimpleItemFactory.Create(TFakeTypeHandler)); + r.Register('Double',TSimpleItemFactory.Create(TFakeTypeHandler)); + r.Register('Extended',TSimpleItemFactory.Create(TFakeTypeHandler)); } end; diff --git a/wst/trunk/ns_http_protocol.pas b/wst/trunk/ns_http_protocol.pas index f3026a9bd..8cea8d87d 100644 --- a/wst/trunk/ns_http_protocol.pas +++ b/wst/trunk/ns_http_protocol.pas @@ -176,7 +176,7 @@ end; procedure NS_RegisterHTTP_Transport(); begin - GetTransportRegistry().Register(sTRANSPORT_NAME,TSimpleItemFactory.Create(THTTPTransport) as IItemFactory); + GetTransportRegistry().Register(sTRANSPORT_NAME,TSimpleItemFactory.Create(THTTPTransport)); end; diff --git a/wst/trunk/same_process_protocol.pas b/wst/trunk/same_process_protocol.pas index 9159b007f..05efb6182 100644 --- a/wst/trunk/same_process_protocol.pas +++ b/wst/trunk/same_process_protocol.pas @@ -76,7 +76,7 @@ end; procedure SAME_PROCESS_Register_Local_Transport(); begin - GetTransportRegistry().Register(sTRANSPORT_NAME,TSimpleItemFactory.Create(TInProcessTransport) as IItemFactory); + GetTransportRegistry().Register(sTRANSPORT_NAME,TSimpleItemFactory.Create(TInProcessTransport)); end; end. diff --git a/wst/trunk/server_binary_formatter.pas b/wst/trunk/server_binary_formatter.pas index 0eb42e797..0b64b7299 100644 --- a/wst/trunk/server_binary_formatter.pas +++ b/wst/trunk/server_binary_formatter.pas @@ -63,7 +63,7 @@ Type function TBinaryFormatterFactory.CreateInstance(): IInterface; begin - Result := TBinaryFormatter.Create() as IFormatterResponse; + Result := TBinaryFormatter.Create(); end; @@ -134,7 +134,7 @@ end; procedure Server_service_RegisterBinaryFormat(); begin - GetFormatterRegistry().Register(sPROTOCOL_NAME,sBINARY_CONTENT_TYPE,TBinaryFormatterFactory.Create() as IItemFactory); + GetFormatterRegistry().Register(sPROTOCOL_NAME,sBINARY_CONTENT_TYPE,TBinaryFormatterFactory.Create()); end; Initialization diff --git a/wst/trunk/server_filter_extension.pas b/wst/trunk/server_filter_extension.pas index 739220254..9a1b12b80 100644 --- a/wst/trunk/server_filter_extension.pas +++ b/wst/trunk/server_filter_extension.pas @@ -178,7 +178,7 @@ end; constructor TFilterExtension.Create; begin inherited; - FPropertyManager := TPublishedPropertyManager.Create(Self) as IPropertyManager; + FPropertyManager := TPublishedPropertyManager.Create(Self); end; function TFilterExtension.GetPropertyManager: IPropertyManager; @@ -244,7 +244,7 @@ end; initialization GetServiceExtensionRegistry().Register( 'TFilterExtension', - TSimpleItemFactory.Create(TFilterExtension) as IItemFactory + TSimpleItemFactory.Create(TFilterExtension) ); end. diff --git a/wst/trunk/server_service_imputils.pas b/wst/trunk/server_service_imputils.pas index c8a65ed2b..24f7b683d 100644 --- a/wst/trunk/server_service_imputils.pas +++ b/wst/trunk/server_service_imputils.pas @@ -109,7 +109,7 @@ begin FFormat := AFormat; FContent := AContent; FResponse := AResponse; - FPropertyManager := TStoredPropertyManager.Create() as IPropertyManager; + FPropertyManager := TStoredPropertyManager.Create(); end; diff --git a/wst/trunk/server_service_intf.pas b/wst/trunk/server_service_intf.pas index 2c7a0f6b4..b53161e61 100644 --- a/wst/trunk/server_service_intf.pas +++ b/wst/trunk/server_service_intf.pas @@ -275,7 +275,7 @@ type property ContentType : string read FContentType; end; - TFormatterRegistry = class(TInterfacedObject,IInterface,IFormatterRegistry) + TFormatterRegistry = class(TInterfacedObject,IFormatterRegistry) private FList : TObjectList; private @@ -540,7 +540,7 @@ end; function TBaseServiceBinder.CreateCallContext(): ICallContext; begin - Result := TSimpleCallContext.Create() as ICallContext; + Result := TSimpleCallContext.Create(); end; procedure TBaseServiceBinder.DoProcessMessage( @@ -618,7 +618,7 @@ Type { TServiceImplementationRegistry } - TServiceImplementationRegistry = class(TInterfacedObject,IInterface,IServiceImplementationRegistry) + TServiceImplementationRegistry = class(TInterfacedObject,IServiceImplementationRegistry) private FList : TObjectList; protected @@ -849,14 +849,14 @@ end; procedure initialize_server_services_intf(); begin if ( FormatterRegistryInst = nil ) then - FormatterRegistryInst := TFormatterRegistry.Create() as IFormatterRegistry; + FormatterRegistryInst := TFormatterRegistry.Create(); if ( ServerServiceRegistryInst = nil ) then begin - ServerServiceRegistryInst := TServerServiceRegistry.Create() as IServerServiceRegistry; + ServerServiceRegistryInst := TServerServiceRegistry.Create(); end; if ( ServiceImplementationRegistryInst = nil ) then - ServiceImplementationRegistryInst := TServiceImplementationRegistry.Create() As IServiceImplementationRegistry; + ServiceImplementationRegistryInst := TServiceImplementationRegistry.Create(); if ( ServiceExtensionRegistryInst = nil ) then - ServiceExtensionRegistryInst := TServiceExtensionRegistry.Create() as IServiceExtensionRegistry; + ServiceExtensionRegistryInst := TServiceExtensionRegistry.Create(); end; procedure finalize_server_services_intf(); diff --git a/wst/trunk/server_service_json.pas b/wst/trunk/server_service_json.pas index 5cf591b71..a24d9ed42 100644 --- a/wst/trunk/server_service_json.pas +++ b/wst/trunk/server_service_json.pas @@ -58,7 +58,7 @@ uses procedure Server_service_RegisterJsonFormat(); begin - GetFormatterRegistry().Register(s_json,s_json_ContentType,TSimpleItemFactory.Create(TJsonRpcFormatter) as IItemFactory); + GetFormatterRegistry().Register(s_json,s_json_ContentType,TSimpleItemFactory.Create(TJsonRpcFormatter)); end; {$IFDEF HAS_JSON_CLONE} diff --git a/wst/trunk/server_service_soap.pas b/wst/trunk/server_service_soap.pas index b146cf46e..b59682028 100644 --- a/wst/trunk/server_service_soap.pas +++ b/wst/trunk/server_service_soap.pas @@ -196,7 +196,7 @@ end; procedure Server_service_RegisterSoapFormat(); begin - GetFormatterRegistry().Register(sPROTOCOL_NAME,sSOAP_CONTENT_TYPE,TSimpleItemFactory.Create(TSOAPFormatter) as IItemFactory); + GetFormatterRegistry().Register(sPROTOCOL_NAME,sSOAP_CONTENT_TYPE,TSimpleItemFactory.Create(TSOAPFormatter)); RegisterStdTypes(); end; diff --git a/wst/trunk/server_service_xmlrpc.pas b/wst/trunk/server_service_xmlrpc.pas index 1cd6268b2..6993d9c32 100644 --- a/wst/trunk/server_service_xmlrpc.pas +++ b/wst/trunk/server_service_xmlrpc.pas @@ -175,7 +175,7 @@ end; procedure Server_service_RegisterXmlRpcFormat(); begin - GetFormatterRegistry().Register(sPROTOCOL_NAME,sXMLRPC_CONTENT_TYPE,TSimpleItemFactory.Create(TXmlRpcFormatter) as IItemFactory); + GetFormatterRegistry().Register(sPROTOCOL_NAME,sXMLRPC_CONTENT_TYPE,TSimpleItemFactory.Create(TXmlRpcFormatter)); end; end. diff --git a/wst/trunk/service_intf.pas b/wst/trunk/service_intf.pas index 02c2b1da7..19ae0f763 100644 --- a/wst/trunk/service_intf.pas +++ b/wst/trunk/service_intf.pas @@ -19,7 +19,7 @@ interface uses Classes, SysUtils, TypInfo, Contnrs, - base_service_intf, wst_types; + base_service_intf; Const sTARGET = 'target'; @@ -84,7 +84,7 @@ Type { TBaseProxy } (* The base class for service proxy *) - TBaseProxy = Class(TInterfacedObject,IInterface,ICallContext,IServiceProtocol) + TBaseProxy = Class(TInterfacedObject,ICallContext,IServiceProtocol) private FTarget : String; FProtocol : IServiceProtocol; @@ -330,7 +330,7 @@ begin if ( AProtocol.GetTransport() = nil ) then raise EServiceConfigException.CreateFmt(SERR_InvalidParameter,['AProtocol.GetTransport()']); - FCallContext := TSimpleCallContext.Create() as ICallContext; + FCallContext := TSimpleCallContext.Create(); FTarget := ATarget; FProtocol := AProtocol; FProtocol.GetSerializer().GetPropertyManager().SetProperty(sTARGET,FTarget); @@ -389,7 +389,7 @@ Type { TServiceProtocol } - TServiceProtocol = class(TInterfacedObject,IInterface,IServiceProtocol) + TServiceProtocol = class(TInterfacedObject,IServiceProtocol) Private FFormatter : IFormatterClient; FCallHandler : ICallMaker; @@ -426,7 +426,7 @@ Type { TFormatterRegistry } //Make it Threadsafe ??? - TFormatterRegistry = class(TInterfacedObject,IInterface,IFormaterQueryRegistry) + TFormatterRegistry = class(TInterfacedObject,IFormaterQueryRegistry) private FList : TObjectList; function IndexOf(Const AName : string ):Integer; @@ -507,7 +507,7 @@ Var function GetFormaterRegistry():IFormaterQueryRegistry; begin If Not Assigned(FormaterRegistryInst) Then - FormaterRegistryInst := TFormatterRegistry.Create() as IFormaterQueryRegistry;// Lock!!! + FormaterRegistryInst := TFormatterRegistry.Create();// Lock!!! Result := FormaterRegistryInst; end; @@ -558,7 +558,7 @@ begin ARes := TServiceProtocol.Create( r.FormaterFactory.CreateInstance() as IFormatterClient, r.CallHandlerFactory.CreateInstance() as ICallMaker - ) as IServiceProtocol; + ); ARes.GetSerializer().GetPropertyManager().SetProperties(initData); ARes.GetCallHandler().GetPropertyManager().SetProperties(initData); End; @@ -595,7 +595,7 @@ end; Type { TTransportRegistry } //Make it Threadsafe ??? - TTransportRegistry = class(TBaseFactoryRegistry,IInterface,ITransportRegistry) + TTransportRegistry = class(TBaseFactoryRegistry,ITransportRegistry) protected function Find( Const ATransportData : string; @@ -609,7 +609,7 @@ Var function GetTransportRegistry():ITransportRegistry; begin If Not Assigned(TransportRegistryInst) Then - TransportRegistryInst := TTransportRegistry.Create() as ITransportRegistry;// Lock!!! + TransportRegistryInst := TTransportRegistry.Create();// Lock!!! Result := TransportRegistryInst; end; @@ -633,8 +633,8 @@ begin end; initialization - TransportRegistryInst := TTransportRegistry.Create() as ITransportRegistry; - FormaterRegistryInst := TFormatterRegistry.Create() as IFormaterQueryRegistry; + TransportRegistryInst := TTransportRegistry.Create(); + FormaterRegistryInst := TFormatterRegistry.Create(); finalization FormaterRegistryInst := nil; diff --git a/wst/trunk/soap_formatter.pas b/wst/trunk/soap_formatter.pas index 454ac146f..dfd808873 100644 --- a/wst/trunk/soap_formatter.pas +++ b/wst/trunk/soap_formatter.pas @@ -248,8 +248,8 @@ begin RegisterStdTypes(); GetFormaterRegistry().Register( sPROTOCOL_NAME, - TSimpleItemFactory.Create(TSOAPFormatter) as IItemFactory, - TSimpleItemFactory.Create(TSOAPCallMaker) as IItemFactory + TSimpleItemFactory.Create(TSOAPFormatter), + TSimpleItemFactory.Create(TSOAPCallMaker) ); end; diff --git a/wst/trunk/synapse_http_protocol.pas b/wst/trunk/synapse_http_protocol.pas index f981f06a0..957a0fbd8 100644 --- a/wst/trunk/synapse_http_protocol.pas +++ b/wst/trunk/synapse_http_protocol.pas @@ -258,7 +258,7 @@ end; procedure SYNAPSE_RegisterHTTP_Transport(); begin - GetTransportRegistry().Register(sTRANSPORT_NAME,TSimpleItemFactory.Create(THTTPTransport) as IItemFactory); + GetTransportRegistry().Register(sTRANSPORT_NAME,TSimpleItemFactory.Create(THTTPTransport)); end; { TSynapseCookieManager } diff --git a/wst/trunk/synapse_tcp_protocol.pas b/wst/trunk/synapse_tcp_protocol.pas index 74f040ed5..49ea49acd 100644 --- a/wst/trunk/synapse_tcp_protocol.pas +++ b/wst/trunk/synapse_tcp_protocol.pas @@ -113,7 +113,7 @@ end; procedure SYNAPSE_RegisterTCP_Transport(); begin - GetTransportRegistry().Register(sTRANSPORT_NAME,TSimpleItemFactory.Create(TTCPTransport) as IItemFactory); + GetTransportRegistry().Register(sTRANSPORT_NAME,TSimpleItemFactory.Create(TTCPTransport)); end; end. diff --git a/wst/trunk/xmlrpc_formatter.pas b/wst/trunk/xmlrpc_formatter.pas index 86f625d99..9f672da4e 100644 --- a/wst/trunk/xmlrpc_formatter.pas +++ b/wst/trunk/xmlrpc_formatter.pas @@ -223,8 +223,8 @@ begin RegisterStdTypes(); GetFormaterRegistry().Register( sPROTOCOL_NAME, - TSimpleItemFactory.Create(TXmlRpcFormatter) as IItemFactory, - TSimpleItemFactory.Create(TXmlRpcCallMaker) as IItemFactory + TSimpleItemFactory.Create(TXmlRpcFormatter), + TSimpleItemFactory.Create(TXmlRpcCallMaker) ); end;