DynamicRequest Class

From RemObjects Wiki
Jump to: navigation, search

This is a Library topic for RemObjects SDK for .NET
This page is generated from external data, please do not update

NamespacesInterfacesClassesEnumsImplements

Contents

Overview

Used to represent a request, or method call, that can be made to a service on a RemObjects SDK Server.

In contrast to making calls in code that use the services imported interfaces, Dynamic Request allows you to make calls to services whose exact definition is not known at compile time.

The service to be called into is identified by the referenced RemoteService component, while the call itself is defined through the MethodName and Parameters properties.

Once a call has been set up and the required parameter values have been specified, the call can be executed by calling the MakeRequest method.

This component is a part of Data Abstract, however the namespace is called RemObjects.SDK. It is contained in DataAbstract.dll.


Location


Properties

MethodName

Specifies the name of the method to call. Note: If the RemoteService property is assigned and the server is available at design time, you can select the method name from a list of available methods in the Property Browser's drop down box. When doing this, the Parameters collection will automatically be populated.



Prism:   property MethodName: String read write
C#:   String MethodName { get; set; }
VB:   Property MethodName As String


Parameters

Defines the parameters that get passed into and out of the method call. For your call to succeed, these exactly have to match the parameters defined for your method; you can use the UpdateParamsFromRodl and UpdateParamsFromRodlOperation methods to populate the parameters automatically. Once the parameters are defined, you can set their values using ParameterByName("Name").Value before you make your call.

Note: If the RemoteService property is assigned and the server is available at design time, you can select the method name from a list of available methods in the Property Browser's drop down box. When doing this, the Parameters collection will automatically be populated.



Prism:   property Parameters: DynamicRequestParameterCollection read
C#:   DynamicRequestParameterCollection Parameters { get; }
VB:   Property ReadOnly Parameters As DynamicRequestParameterCollection


RemoteService

References the RemoteService component that defines the service to call.



Prism:   property RemoteService: RemoteService read write
C#:   RemoteService RemoteService { get; set; }
VB:   Property RemoteService As RemoteService


ResultParameter



Prism:   property ResultParameter: DynamicRequestParameter read
C#:   DynamicRequestParameter ResultParameter { get; }
VB:   Property ReadOnly ResultParameter As DynamicRequestParameter


Instance Methods

constructor ()



Oxygene:   constructor
C#:   constructor()
VB:   Sub New


constructor (IContainer)



Oxygene:   constructor(container: IContainer)
C#:   constructor(IContainer container)
VB:   Sub New (container As IContainer)


Parameters:

  • container:


constructor (String, RemoteService)



Oxygene:   constructor(methodName: String; remoteService: RemoteService)
C#:   constructor(String methodName, RemoteService remoteService)
VB:   Sub New (methodName As String, remoteService As RemoteService)


Parameters:

  • methodName:
  • remoteService:


constructor (String, RemoteService, array of DynamicRequestParameter)



Oxygene:   constructor(methodName: String; remoteService: RemoteService; parameters: array of DynamicRequestParameter)
C#:   constructor(String methodName, RemoteService remoteService, array of DynamicRequestParameter parameters)
VB:   Sub New (methodName As String, remoteService As RemoteService, parameters As array of DynamicRequestParameter)


Parameters:

  • methodName:
  • remoteService:
  • parameters:


constructor (String, RemoteService, DynamicRequestParameterCollection)



Oxygene:   constructor(methodName: String; remoteService: RemoteService; parameters: DynamicRequestParameterCollection)
C#:   constructor(String methodName, RemoteService remoteService, DynamicRequestParameterCollection parameters)
VB:   Sub New (methodName As String, remoteService As RemoteService, parameters As DynamicRequestParameterCollection)


Parameters:

  • methodName:
  • remoteService:
  • parameters:


constructor (String, RemoteService, IList<DynamicRequestParameter>)



Oxygene:   constructor(methodName: String; remoteService: RemoteService; parameters: IList<DynamicRequestParameter>)
C#:   constructor(String methodName, RemoteService remoteService, IList<DynamicRequestParameter> parameters)
VB:   Sub New (methodName As String, remoteService As RemoteService, parameters As IList<DynamicRequestParameter>)


Parameters:

  • methodName:
  • remoteService:
  • parameters:


BeginMakeRequest



Oxygene:   method BeginMakeRequest(cb: AsyncCallback; state: Object): IAsyncResult
C#:   IAsyncResult BeginMakeRequest(AsyncCallback cb, Object state)
VB:   Function BeginMakeRequest(cb As AsyncCallback, state As Object) As IAsyncResult


Parameters:

  • cb:
  • state:


EndMakeRequest



Oxygene:   method EndMakeRequest(ar: IAsyncResult)
C#:   void EndMakeRequest(IAsyncResult ar)
VB:   Sub EndMakeRequest(ar As IAsyncResult)


Parameters:

  • ar:


MakeRequest

Performs the actual request to the remote service.


Oxygene:   method MakeRequest
C#:   void MakeRequest()
VB:   Sub MakeRequest


ParameterByName

Returns the DynamicRequestParameter of a given name. You can use this method to conveniently populate all parameters with their proper values without relying on their ordering, as shown in the example below.


Oxygene:   method ParameterByName(parameterName: String): DynamicRequestParameter
C#:   DynamicRequestParameter ParameterByName(String parameterName)
VB:   Function ParameterByName(parameterName As String) As DynamicRequestParameter


Parameters:

  • parameterName:


ReadParameter   protected



Oxygene:   method ReadParameter(message: IMessage; parameter: DynamicRequestParameter)
C#:   void ReadParameter(IMessage message, DynamicRequestParameter parameter)
VB:   Sub ReadParameter(message As IMessage, parameter As DynamicRequestParameter)


Parameters:

  • message:
  • parameter:


SetupDefaultRequest   protected



Oxygene:   method SetupDefaultRequest
C#:   void SetupDefaultRequest()
VB:   Sub SetupDefaultRequest


UpdateParamsFromRodl

Retrieves the RODL file from the server, locates the service and method and populates the Parameters collection with the appropriate parameters needed for the method call. Any parameters or values defined prior to calling UpdateParamsFromRodl will be lost.


Oxygene:   method UpdateParamsFromRodl
C#:   void UpdateParamsFromRodl()
VB:   Sub UpdateParamsFromRodl


UpdateParamsFromRodlOperation

Populates the Parameters collection with the appropriate parameters needed for the method call. In contrast to UpdateParamsFromRodl, it will not try to obtain the RODL file from the server, but work with the passed RodlOperation instance. Any parameters or values defined prior to calling UpdateParamsFromRodlOperation will be lost.


Oxygene:   method UpdateParamsFromRodlOperation(operation: RodlOperation)
C#:   void UpdateParamsFromRodlOperation(RodlOperation operation)
VB:   Sub UpdateParamsFromRodlOperation(operation As RodlOperation)


Parameters:

  • operation:


Validate   protected



Oxygene:   method Validate
C#:   void Validate()
VB:   Sub Validate


WriteParameter   protected



Oxygene:   method WriteParameter(message: IMessage; parameter: DynamicRequestParameter)
C#:   void WriteParameter(IMessage message, DynamicRequestParameter parameter)
VB:   Sub WriteParameter(message As IMessage, parameter As DynamicRequestParameter)


Parameters:

  • message:
  • parameter:


Descendants


See Also


Product: RemObjects SDK
Available Editions: RemObjects SDK for .NET, Xcode, Delphi, Java and JavaScript

GlossaryArticlesLibrarySamples

Personal tools
Namespaces

Variants
Actions
Navigation
products
platforms
special
Toolbox