Esempio n. 1
0
        public static void ConnectionTest()
        {
            try
            {
                var body = new FindItemRequest.FindItemRequest();

                var item = EwsRequest <FindItemResponse>(body, "FindItem", "Browse_All");
            }
            catch (Exception)
            { }
        }
Esempio n. 2
0
        private static bool FindItem(string id)
        {
            var body = new FindItemRequest.FindItemRequest();

            var item = EwsRequest <FindItemResponse>(body, "FindItem", "Browse_All");

            if (item != null)
            {
                var ids = item.Body.ResponseMessages.Items.SelectMany(p => p.RootFolder.Items).Select(p => p.ItemId).ToList();

                var finded = ids.FirstOrDefault(p => p.Id == id);

                if (finded != null && Message != null)
                {
                    Message.ChangeKey = finded.ChangeKey;

                    return(true);
                }
            }

            return(false);
        }