BindToItem method

Future<Item?> BindToItem(
  1. ItemId? itemId,
  2. PropertySet propertySet
)
Binds to item. The item id. The property set.

Implementation

Future<Item?> BindToItem(ItemId? itemId, PropertySet propertySet) async {
  EwsUtilities.ValidateParam(itemId, "itemId");
  EwsUtilities.ValidateParam(propertySet, "propertySet");

  ServiceResponseCollection<GetItemResponse> responses =
      await InternalBindToItems(
        [itemId],
        propertySet,
        null,
        /* anchorMailbox */
        ServiceErrorHandling.ThrowOnError,
      );

  return responses[0].Item;
}