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);- Log in to post comments