加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net-mvc – DDay iCal – 添加一个与会者

发布时间:2020-12-15 23:26:49 所属栏目:asp.Net 来源:网络整理
导读:如何在iCal活动中添加必要/可选的参加者组织者? 我正在使用优秀的DDay图书馆,并希望能够也能够add a CN,但在documentation,下载的例子或其他地方没有找到任何例子. 谢谢! 解决方法 我得到一个解决方案不是很整齐,但它为我工作. iCalendar calendar = new i
如何在iCal活动中添加必要/可选的参加者组织者?

我正在使用优秀的DDay图书馆,并希望能够也能够add a CN,但在documentation,下载的例子或其他地方没有找到任何例子.

谢谢!

解决方法

我得到一个解决方案不是很整齐,但它为我工作.
iCalendar calendar = new iCalendar();
calendar.Method = "PUBLISH";

Event evt = calendar.Create<Event>();

var attendes = new List<IAttendee>();
//required attendee
IAttendee attendee1 = new DDay.iCal.Attendee("MAILTO:myid@gmail.com")
{
    CommonName = "Naveen Jose",Role = "REQ-PARTICIPANT"
};
attendes.Add(attendee1);
//optional attendee
IAttendee attendee2 = new DDay.iCal.Attendee("MAILTO:someid@codovations.com")
{
    CommonName = "Noah Naveen",Role = "OPT-PARTICIPANT"
};
attendes.Add(attendee2);
if (attendes != null && attendes.Count > 0)
{
    evt.Attendees = attendes;
}

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读