internal async Task <bool> FetchAsync(iMessageHandle pMessageHandle, cMessageCacheItems pItems) { var lContext = mRootContext.NewMethodV(true, nameof(cIMAPClient), nameof(FetchAsync), 1); if (pMessageHandle == null) { throw new ArgumentNullException(nameof(pMessageHandle)); } if (pItems == null) { throw new ArgumentNullException(nameof(pItems)); } if (pMessageHandle.Contains(pItems)) { return(true); } await ZFetchCacheItemsAsync(cMessageHandleList.FromMessageHandle(pMessageHandle), pItems, null, lContext).ConfigureAwait(false); return(pMessageHandle.Contains(pItems)); }
internal bool Fetch(iMessageHandle pMessageHandle, cMessageCacheItems pItems) { var lContext = mRootContext.NewMethodV(true, nameof(cIMAPClient), nameof(Fetch), 1); if (pMessageHandle == null) { throw new ArgumentNullException(nameof(pMessageHandle)); } if (pItems == null) { throw new ArgumentNullException(nameof(pItems)); } if (pMessageHandle.Contains(pItems)) { return(true); } var lTask = ZFetchCacheItemsAsync(cMessageHandleList.FromMessageHandle(pMessageHandle), pItems, null, lContext); mSynchroniser.Wait(lTask, lContext); return(pMessageHandle.Contains(pItems)); }