Summer Myerson · Mar 13, 2025 go to post

It looks like the IdentityTypes property is not a $list, but a list collection. You can read more about those here: https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cl… 

To use list collections in .NET IRIS Native, you treat them like any other IRISObject.

Your sample code would now look something like this

IRIS iris = IRIS.CreateIRIS(conn);
IRISObject OidMap = (IRISObject)iris.ClassMethodObject("HS.Data.OIDMap","%New");
var oType = iris.ClassMethodObject("HS.Data.OIDType","%OpenId","Device");

// new code
IRISObject newList = (IRISObject)iris.ClassMethodObject("%ListOfDataTypes", "%New");
newList.InvokeVoid("Insert", oType);
OidMap.Set("IdentityTypes",newList);

Also, you don't need to instantiate the list directly, and can get it by accessing the existing property instead

IRISObject list = (IRISObject)OidMap.GetObject("IdentityTypes")
list.InvokeVoid("Insert",oType);
Summer Myerson · Nov 19, 2024 go to post

We're currently working on getting our .NET packages posted on NuGet, @Stefan Wittmann has the latest details.

We also currently ship both .dll and .nupkg files for each of our .NET projects with IRIS, so you can use those nupkg files in the meantime. 

Summer Myerson · May 21, 2024 go to post

If you're not getting the IRIS Security Error every time, only when there's multiple calls, then it's possible you're exceeding your license's allowed number of concurrent connections, so I would check there first. 

Also, the call to IRISPoolManager.RemoveAllIdleConnections() will remove any connections that have been closed but are still in the pool. Calling this after every Connection.Close() will undo any advantages of connection pooling. If you want to disable pooling, you can add "Pooling = False" to the connection string, then the call is unnecessary. If you want to use pooling, you should remove the call to RemoveAllIdleConnections(). 

Summer Myerson · Nov 28, 2023 go to post

Hi Enrico! Apologies for the late reply, but I wanted to add that if you are looking to use %ListOfObejcts on the IRIS side with an array on the .NET side, that's still possible. Here's a snippet of code as an example:

set addressArray = ##class(%ListOfObjects).%New()
    do addressArray.Insert(home)
    do addressArray.Insert(home2)
	// create an array of Address on the .NET side, populated with values from addressArrayset test.AddressArray = gateway.new("Samples.InterSystems.Gateway.Address[*]", addressArray)
	// get Address array from .NET, and populate %ListOfObjects with its valuesset addressArray = test.AddressArray.%getall()
    for i=1:1:addressArray.Count() {
        set home = addressArray.GetAt(i)
    }

I'm working on a larger example to demo the new gateway and will be posting that soon. It's the same one that Dan Pasco mentioned in This Comment. Hope this helps!

Summer Myerson · Mar 10, 2022 go to post

This was an oversight that has now been corrected. Thank you for bringing it to our attention!