private List<EventAttribute> LoadEventAttributes(ComAeClient client, int eventTypeId, int categoryId)
{
List<EventAttribute> attributes = new List<EventAttribute>();
int[] ids = null;
string[] descriptions = null;
short[] dataTypes = null;
try
{
client.GetEventAttributes(categoryId, out ids, out descriptions, out dataTypes);
}
catch (Exception e)
{
Utils.Trace(e, "Unexpected error fetching event attributes.");
ids = null;
}
if (ids != null)
{
for (int ii = 0; ii < ids.Length; ii++)
{
EventAttribute attribute = new EventAttribute();
attribute.Id = ids[ii];
attribute.Description = descriptions[ii];
attribute.VarType = dataTypes[ii];
attributes.Add(attribute);
}
}
return attributes;
}