/// <remarks/> public void GetItemAsync(GetItemType GetItem1, object userState) { if ((this.GetItemOperationCompleted == null)) { this.GetItemOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetItemOperationCompleted); } this.InvokeAsync("GetItem", new object[] { GetItem1}, this.GetItemOperationCompleted, userState); }
/******************************************************************** * GET ITEM FOR ID SUPPLIED ********************************************************************/ private static ItemType GetItemForID(String id) { ItemIdType iit = new ItemIdType(); iit.Id = id; GetItemType git = new GetItemType(); git.ItemIds = new ItemIdType[] { iit }; git.ItemShape = new ItemResponseShapeType(); git.ItemShape.BaseShape = DefaultShapeNamesType.AllProperties; GetItemResponseType girt = service.GetItem(git); if (girt.ResponseMessages.Items[0].ResponseClass == ResponseClassType.Error) throw new Exception(String.Format("Unable to get message item and Mime Content\r\n{0}\r\n{1}", girt.ResponseMessages.Items[0].ResponseCode, girt.ResponseMessages.Items[0].MessageText)); ItemType message = null; if (girt.ResponseMessages.Items.Count() > 0) message = (((ItemInfoResponseMessageType)girt.ResponseMessages.Items[0]).Items.Items[0]); return message; }
/// <remarks/> public void GetItemAsync(GetItemType GetItem1) { this.GetItemAsync(GetItem1, null); }