DDay iCal - 添加与会者

发布于 2024-12-09 17:10:29 字数 298 浏览 1 评论 0原文

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

我正在使用优秀的 DDay 库,并且希望能够添加 CN,但还没有'在文档中找不到任何示例,下载的示例或其他地方。

谢谢!

How does one add required/optional attendees + organizer(s) to an iCal event?

I'm using the excellent DDay library, and would love to be able to also add a CN, but haven't found any examples in the documentation, the downloaded examples or elsewhere.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

飘逸的'云 2024-12-16 17:10:29

我得到了一个解决方案。不是很整洁,但它对我有用。

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:[email protected]")
{
    CommonName = "Naveen Jose",
    Role = "REQ-PARTICIPANT"
};
attendes.Add(attendee1);
//optional attendee
IAttendee attendee2 = new DDay.iCal.Attendee("MAILTO:[email protected]")
{
    CommonName = "Noah Naveen",
    Role = "OPT-PARTICIPANT"
};
attendes.Add(attendee2);
if (attendes != null && attendes.Count > 0)
{
    evt.Attendees = attendes;
}

I got a solution. Not very neat but its working for me.

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:[email protected]")
{
    CommonName = "Naveen Jose",
    Role = "REQ-PARTICIPANT"
};
attendes.Add(attendee1);
//optional attendee
IAttendee attendee2 = new DDay.iCal.Attendee("MAILTO:[email protected]")
{
    CommonName = "Noah Naveen",
    Role = "OPT-PARTICIPANT"
};
attendes.Add(attendee2);
if (attendes != null && attendes.Count > 0)
{
    evt.Attendees = attendes;
}
哆兒滾 2024-12-16 17:10:29

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

IAttendee attendee1 = new DDay.iCal.Attendee("MAILTO:[email protected]")
{
    CommonName = "Naveen Jose",
    Role = "REQ-PARTICIPANT",
    RSVP = true
};

You could also use RSVP = true to prompt for a reply from the attendee

IAttendee attendee1 = new DDay.iCal.Attendee("MAILTO:[email protected]")
{
    CommonName = "Naveen Jose",
    Role = "REQ-PARTICIPANT",
    RSVP = true
};
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文