CreateItemFromItemClass static method
Creates Item from Item class.
The item attachment.
The item class.
If true, item attachment is new.
Implementation
static Item CreateItemFromItemClass(
ItemAttachment itemAttachment, Type? itemClass, bool isNew) {
if (EwsUtilities
.serviceObjectInfo.Member!.ServiceObjectConstructorsWithAttachmentParam
.containsKey(itemClass)) {
CreateServiceObjectWithAttachmentParam creationDelegate = EwsUtilities
.serviceObjectInfo
.Member!
.ServiceObjectConstructorsWithAttachmentParam[itemClass!]!;
return creationDelegate(itemAttachment, isNew) as Item;
} else {
throw new ArgumentException(
"Strings.NoAppropriateConstructorForItemClass");
}
}