InternalCreate method
Future<List<Item> >
InternalCreate(
- FolderId? parentFolderId,
- MessageDisposition? messageDisposition
Implementation
Future<List<Item>> InternalCreate(
FolderId? parentFolderId,
MessageDisposition? messageDisposition,
) async {
(PropertyBag[ResponseObjectSchema.ReferenceItemId] as ItemId).Assign(
_referenceItem.Id!,
);
// ExchangeService.InternalCreateResponseObject requires a non-null
// MessageDisposition; this response object is created without one (the
// C# API passes null), so the request is built here.
CreateResponseObjectRequest request = CreateResponseObjectRequest(
Service,
ServiceErrorHandling.ThrowOnError,
);
request.ParentFolderId = parentFolderId;
request.Items = [this];
request.MessageDisposition = messageDisposition;
ServiceResponseCollection<CreateResponseObjectResponse> responses =
await request.Execute();
return responses[0].Items!.whereType<Item>().toList();
}