abstract class %Net.Remote.DotNet.Test
extends %RegisteredObject
Parameters
|
Properties
|
Methods
|
Queries
|
Indices
|
ForeignKeys
|
Triggers
|
|
|
7
|
|
|
|
|
classmethod Connect(port As %Integer, host As %String)
as %Net.Remote.Gateway
classmethod ListTypeLibs(port As %Integer = "", host As %String = "127.0.0.1")
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.
final classmethod ProcessError(status As %Status)
classmethod StartGatewayTemp(Output ogserver As %Net.Remote.ObjectGateway, ByRef port As %String, host As %String = "127.0.0.1", verbose As %Boolean = 1)
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 = "127.0.0.1")
This shows how to use the 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).Test(port[,host])
final classmethod TestArrays(port As %Integer, host As %String = "127.0.0.1")
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 = "127.0.0.1")