首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >DDay iCal -添加与会者

DDay iCal -添加与会者
EN

Stack Overflow用户
提问于 2011-10-13 08:48:54
回答 2查看 4.1K关注 0票数 13

如何向iCal活动添加必需/可选参与者+组织者?

我正在使用优秀的DDay库,也希望能够使用add a CN,但在documentation、下载的示例或其他地方找不到任何示例。

谢谢!

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2011-11-24 14:55:47

我有个解决方案。不是很整洁,但它对我很有效。

代码语言:javascript
复制
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;
}
票数 9
EN

Stack Overflow用户

发布于 2015-04-24 17:22:58

您还可以使用RSVP = true提示来自与会者的回复

代码语言:javascript
复制
IAttendee attendee1 = new DDay.iCal.Attendee("MAILTO:myid@gmail.com")
{
    CommonName = "Naveen Jose",
    Role = "REQ-PARTICIPANT",
    RSVP = true
};
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7748246

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档