using Citrix.Common.Sdk;
using Citrix.XenApp.Sdk;
using Citrix.XenApp.Commands;
using Citrix.Management.Automation;
我正在尝试将客户端地址放入数组中以添加到列表中。问题是当我测试它时,ClientAddress 不断返回 null。我可以在线看到用户,并且他们的客户端地址在 App Center 中可见。使用 ServerName 返回没有问题。有人知道为什么 ClientAddress 不起作用吗?
private List<string[]> findUser(string strUser)
{
List<string[]> list = new List<string[]>();
GetXASessionByFarm sessions = new GetXASessionByFarm(true);
foreach (XASession session in CitrixRunspaceFactory.DefaultRunspace.ExecuteCommand(sessions))
{
if (session.AccountName == objWINS + "\\" + strUser)
{
string[] result = new string[3];
result[0] = strUser;
result[1] = session.ServerName; //This is working, it comes back with the server name.
result[2] = session.ClientAddress; //This isn't working, it comes back blank.
MessageBox.Show(result[2]);
list.Add(result);
}
}
return list;
}