我需要使用EWS API检索的ItemAttachments但我不知道所有不同项目类型的文件扩展名。我只能获取EmailMessage和Contact类型项的扩展名。以下是代码:
if (attachment is ItemAttachment)
{
var itemAttachment = attachment as ItemAttachment;
itemAttachment.Load(new PropertySet(ItemSchema.MimeContent));
var fileExtension = "";
if (itemAttachment.Item is EmailMessage)
{
fileExtension = ".eml";
}
else if (itemAttachment.Item is PostItem)
{
fileExtension =??
}
else if (itemAttachment.Item is Contact)
{
fileExtension = ".vcf";
}
else if (itemAttachment.Item is ContactGroup)
{
fileExtension =??
}
else if (itemAttachment.Item is Appointment)
{
fileExtension = ??
}
else if (itemAttachment.Item is Task)
{
fileExtension = ??
}
}
请问其他项目的文件扩展名是什么?