我正在使用 DNN 6.2 并尝试创建通知,但由于我是新手,所以不太了解 API。
文档建议如下
NotificationsController.Instance.SendNotification(
notification,
PortalSettings.PortalId,
new List<RoleInfo>(), // Pass here the list of roles or null if the notification is going to be sent to individual users only.
new List<UserInfo>(), // Pass here the list of users or null if the notification is going to be sent to roles only.
); // There is an overload that doesn't receive this parameter and uses Admin as sender.
我有一个已经定义并填充了 userIds 的列表
private List<string> listOfFriends = new List<string>();
所以我虽然下面的工作
NotificationsController.Instance.SendNotification(notification, PortalSettings.PortalId,"", listOfFriends);
但我收到一个错误'有一些无效的论点。
我究竟做错了什么?