Esempio n. 1
0
		/// <remarks/>
		public void DeleteItemAsync(DeleteItemType DeleteItem1, object userState)
		{
			if ((DeleteItemOperationCompleted == null))
			{
				DeleteItemOperationCompleted = new SendOrPostCallback(OnDeleteItemOperationCompleted);
			}
			InvokeAsync("DeleteItem", new object[]
			                          	{
			                          		DeleteItem1
			                          	}, DeleteItemOperationCompleted, userState);
		}
Esempio n. 2
0
		/// <remarks/>
		public IAsyncResult BeginDeleteItem(DeleteItemType DeleteItem1, AsyncCallback callback, object asyncState)
		{
			return BeginInvoke("DeleteItem", new object[]
			                                 	{
			                                 		DeleteItem1
			                                 	}, callback, asyncState);
		}
Esempio n. 3
0
		/// <remarks/>
		public void DeleteItemAsync(DeleteItemType DeleteItem1)
		{
			DeleteItemAsync(DeleteItem1, null);
		}
		private void DeleteItem(BaseItemIdType itemId)
		{
			DeleteItemType deleteItemRequest = new DeleteItemType();
			deleteItemRequest.DeleteType = DisposalType.HardDelete;
			deleteItemRequest.AffectedTaskOccurrences = AffectedTaskOccurrencesType.SpecifiedOccurrenceOnly;
			deleteItemRequest.AffectedTaskOccurrencesSpecified = true;
			deleteItemRequest.SendMeetingCancellations = CalendarItemCreateOrDeleteOperationType.SendToNone;
			deleteItemRequest.SendMeetingCancellationsSpecified = true;

			deleteItemRequest.ItemIds = new BaseItemIdType[] { itemId };

			DeleteItemResponseType response = Service.DeleteItem(deleteItemRequest);
			ResponseMessageType responseMessage = response.ResponseMessages.Items[0];

			if (responseMessage.ResponseCode != ResponseCodeType.NoError)
			{
				throw new Exception("DeleteItem failed with response code " + responseMessage.ResponseCode);
			}
		}