Encontrar

Pregunta
· 23 ago, 2024

.NET External language server and output variables (IRISReference)

Hello, 

I'm working on building some .NET Scripts/CLI tools and starting to use the .NET external language server.

I've been able to connect using the .NET SDK, but trying to understand a little how to make a call that has a output parameter. I've read that you should use IRISReference, but haven't been able to get that to work. Here is what I'm trying to do

I'm trying to make a call to the %SYS.Namespace.ListAll() method but as you will note, the first param for the method is an output param (https://docs.intersystems.com/irisforhealthlatest/csp/documatic/%25CSP.D...)

If you read the https://docs.intersystems.com/irisforhealth20242/csp/docbook/DocBook.UI....
it references you should use IRISReference and then use that object when passing into the method. Example below

  IRISReference valueRef = new IRISReference(""); // set inital value to null string
  iris.ClassMethodString("%SomeClass","SomeMethod",valueRef);
  String myString = valueRef.value;               // get the method result

In my code I'm using the following, but receive a message of "Index was outside the bounds of the array." How should I be using the IRISReference object when the parameter expects an Output like the above %SYS.Namespace.ListAll() method

using InterSystems.Data.IRISClient;
using InterSystems.Data.IRISClient.ADO;

IRISConnection Conn;

try
{
    Conn = new IRISConnection();
    Conn.ConnectionString = "Server=myserver; Port=1972; Namespace=%SYS;Password=password; User ID=username";
    Conn.Open();

    IRIS iris = IRIS.CreateIRIS(Conn);
    IRISReference a = new IRISReference("");

    iris.ClassMethodStatusCode("%SYS.Namespace","ListAll",a);
    Conn.Close();
}
catch (Exception eConn)
{
    //this returns Index was outside the bounds of the array.
    Console.WriteLine(eConn.Message);
}
3 comentarios
Comentarios (3)2
Inicie sesión o regístrese para continuar
Pregunta
· 23 ago, 2024

How do I get the instantiated name of a class

Hi Guys

How do get the item name of a class? I have several items derived from the same class, and for error reporting I want to get the name of the item which created it, rather than the class it is derived from from.

e.g. InPhase.LEGACY.GetUpdateNotification, InPhase.LFPSE.GetUpdateNotification and InPhase.ADHOC.GetUpdateNotification are all derived from the same class  InPhase.Services.LoadInPhaseUpdates

I'm aware that the $CLASSNAME($THIS) can be used to get classname, but this doesn't help.

Can anyone help?

Andy

6 comentarios
Comentarios (6)2
Inicie sesión o regístrese para continuar
Comentarios (1)2
Inicie sesión o regístrese para continuar
Artículo
· 23 ago, 2024 Lectura de 1 min

QuinielaML - Predicciones de la 2ª jornada de la Quiniela

Vamos con nuestro artículo semanal con la predicción de la Quiniela, confiemos que algo más acertada que la hecatombe vivida en la pasada jornada. Veamos cuales son los partidos que entran esta jornada en la Quiniela:

Ahora la predicción para la Primera División:

Y los partidos de Segunda:

Esto nos da la siguiente Quiniela:

Como véis, pocas variantes para esta jornada. ¡Suerte con las apuestas!

Comentarios (0)1
Inicie sesión o regístrese para continuar
Artículo
· 22 ago, 2024 Lectura de 2 min

第六章 设置和其他常见活动 - 编辑 IRIS 凭证集

第六章 设置和其他常见活动 - 编辑 IRIS 凭证集

编辑 IRIS 凭证集

创建 IRIS 凭证集后,可以按如下方式编辑它:

  1. 在管理门户中,选择系统管理 > 安全 > X.509 凭证。
  2. 在凭证集表中,别名列的值用作标识符。对于要编辑的凭证集,请单击编辑。
  3. 根据需要进行编辑。有关这些字段的信息,请参阅上一节。
  4. 单击“保存”以保存更改。

无法更改凭证集的别名或证书;也无法添加、更改或删除关联的私钥。要进行此类更改,请创建新的凭证集。

通过编程方式检索凭证集

执行加密或签名时,必须指定要使用的证书。为此,可以选择 IRIS 凭证集。

当手动创建 WS-Security 标头时,必须以编程方式检索凭据集并使用它。

作为参考,本节讨论以下常见活动:

Comentarios (0)1
Inicie sesión o regístrese para continuar