0

我正在使用 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);

但我收到一个错误'有一些无效的论点。

我究竟做错了什么?

4

1 回答 1

0

你得到这个工作了吗?

我认为这

NotificationsController.Instance.SendNotification(notification, PortalSettings.PortalId,"", listOfFriends);

应该

NotificationsController.Instance.SendNotification(notification, PortalSettings.PortalId, **null**, listOfFriends);
于 2012-10-24T09:20:15.497 回答