Home > Class Reference > %SYS namespace > %Net.Remote.DotNet.Test


abstract class %Net.Remote.DotNet.Test extends %Library.RegisteredObject

Method Inventory (Including Private)

Methods (Including Private)

classmethod Connect(port As %Integer, host As %String) as %Net.Remote.Gateway
classmethod ListTypeLibs(port As %Integer = "", host As %String = "", version As %String = "2.0")
Demonstrate COM object access via the Object Gateway for .NET. This example provides type library enumeration on the target system using the provided Interop.TLLib.dll which is an interop to TL.dll.
It starts a temporary Object Gateway for .NET; generates proxy classes if they have not been generated yet; uses them to list the type libraries; disconnects; stops the Gateway.
Multiple users on the same system should not start individual Gateway servers but rather start one Gateway and have each client connect to it.
Parameter version indicates whether to use .NET 2.0 (default) or 4.0.
final classmethod ProcessError(status As %Status)
classmethod StartGatewayTemp(Output ogserver As %Net.Remote.ObjectGateway, ByRef port As %String, host As %String = "", verbose As %Boolean = 1, version As %String = "2.0") as %Status
Demonstrate how to programmatically start an Object Gateway for .NET without creating a persistent definition. To run the example, execute from your namespace:
>Set status = Do ##class(%Net.Remote.DotNet.Test).StartGatewayTemp(.ogserver,.port,host,verbose)
The in-memory object instance ogserver of the Gateway server that was started can be used to stop it later.
You may pass a port number, or pass a null variable by reference to have a port assigned for you.
Note: To start a persistent Object Gateway by its name, define the Object Gateway and run instead:
>Set status = Do ##class(%Net.Remote.Service).StartGateway(name,verbose)
final classmethod Test(port As %Integer, host As %String = "")
This shows how to use the sample classes delivered with Cache and Ensemble in subdirectory ...\dev\dotnet\samples\remote\test.
The documentation contains information about how to use the .NET Gateway in Cache which applies for Cache and Ensemble, plus additional specific information for Ensemble in case of Ensemble instances.
The steps below give a quick overview of what is required to run this sample method. For more details, refer to the documentation.
- Compile the sample classes and place the resulting DotNetGatewaySamples.DLL is subdirectory ...\dev\dotnet\bin.
- Start the Object Gateway Server for .NET. This can be done by configuring and starting the Gateway using the Management Portal, or adding a Business Service using the EnsLib.DotNetGateway.Service class, or directly at the Windows command prompt, or invoking method StartGatewayTemp().
- In Studio, generate the proxy classes in your namespace, by using the .NET Wizard available under Tools | Add-Ins.
- Run from your namespace:
>Do ##class(%Net.Remote.DotNet.Test).Test(port[,host])
- Stop the Gateway.
final classmethod TestArrays(port As %Integer, host As %String = "")
This shows how to use arrays. The test uses sample classes delivered with Cache and Ensemble in subdirectory dev\dotnet\samples\remote\test. We assume that DotNetGatewaySamples.DLL is in the same directory as the Gateway distribution files. To run the example, start the Object Gateway Server for .NET, then run from your namespace: Do ##class(%Net.Remote.DotNet.Test).TestArrays(port[,host])
final classmethod TestEager(port As %Integer, eager As %Boolean = 1, runs As %Integer = 1000, host As %String = "")

Inherited Members

Inherited Methods (Including Private)