Hi,
I've written custom service broker. When I execute any of its methods which are returning list type I'm getting following exception:
Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
...the problem is that the exception is raised after my broker code is excecuted, and I cannot debug it.
Exemple method of my broker is:
Method(nameof(GetList), MethodType.List, nameof(GetList), "Gets a list",
new stringt] { nameof(UserId), nameof(PageSize), nameof(PageNum) },
new stringt] { nameof(UserId), nameof(PageSize), nameof(PageNum) },
new stringt] {
#region OutputParams
#endregion
}
)]
public List<ListItem> GetList()
{
List<ListItem> result = new List<ListItem>();
try
{
result = listGenerator.GenerateList();
}
catch (Exception e)
{
logger.Error(e);
throw e;
}
return result;
}