IDOProtocol .NET class library

The IDOProtocol .NET class library contains classes that correspond to each level in the hierarchy of an IDO request or response. These classes are used to construct IDO requests and responses. All IDOProtocol classes are in the Mongoose.IDO.Protocol namespace.

The top level of the IDOProtocol class hierarchy is implemented by the IDORequestEnvelope class, and the IDO request or RequestHeader in XML, is implemented by the IDORequest class. The request payload implementation varies depending on the request type.

  • For an OpenSession request, the payload is implemented by the OpenSessionRequestData class.
  • For a LoadCollection request, the payload is implemented by the LoadCollectionRequestData class.

There are other similar classes for each request type that carries a payload.

The IDO responses are implemented in classes that mirror the requests, with the IDOResponseEnvelope at the top of the hierarchy.

Executing an IDO runtime Invoke call using IDOProtocol classes

As an example, these steps are required to execute an IDO runtime Invoke call using IDOProtocol classes:

  1. Create a new IDORequestEnvelope instance.
  2. Set the IDORequestEnvelope.SessionID property.
  3. Create a new instance of IDORequest.
  4. Set the IDORequest.Type property to Invoke.
  5. Create a new instance of InvokeRequestData.
  6. Set the InvokeRequestData.IDOName property.
  7. Set the InvokeRequestData.MethodName property.
  8. Add the parameters to the InvokeRequestData.Parameters collection.
  9. Add the IDORequest to the IDORequestEnvelope.Requests collection.
  10. Set the payload for the IDORequest using the IDORequest.SetPayload method.
  11. Send the completed IDORequestEnvelope to the IDO runtime and receive the IDOResponseEnvelope in return.

Using the IIDOCommands interface

Whether you write the code on the client side or in an IDO extension class, the framework also provides wrapper methods through the IIDOCommands interface. These wrappers typically reduce IDO interactions to a single line of code.

When you use the IIDOCommands interface, you can only specify one IDO request per command and receive one response per command. But when you use the IDOProtocols classes instead, you can build one IDORequestEnvelope that includes multiple requests, and then receive one response that includes information for all the requests.

Using the ApplicationDB class

The ApplicationDB class, part of the Mongoose.IDO.DataAccess namespace, is available only to extension classes. This class provides direct access to the application database and access to common framework features, such as application messages and session variables. See ApplicationDB class.

Note: The ApplicationDB class replaces the AppDB class. Existing code that uses the AppDB class continues to work, but only works on Microsoft SQL Server databases. The ApplicationDB class works with any framework-supported database.