private SyncResponse SyncCreation(string itemId, SyncRequest syncRequest)
        {
            SyncResponse response = this.Sync(syncRequest);
            SyncStatus   status   = response.GetAddResponseStatus(0);

            EasConnectionWrapper.WrapException(delegate()
            {
                response.ThrowIfStatusIsFailed(status);
            }, (ConnectionsTransientException e) => new EasSyncFailedTransientException(e.Message, e), (ConnectionsPermanentException e) => new EasSyncFailedPermanentException(e.Message, e));
            return(response);
        }
        private void SyncUpdate(string messageId, SyncRequest syncRequest)
        {
            SyncResponse response = this.Sync(syncRequest);
            SyncStatus   status   = response.GetChangeResponseStatus(0);

            if (status == SyncStatus.SyncItemNotFound)
            {
                MrsTracer.Provider.Warning("Source message {0} doesn't exist", new object[]
                {
                    messageId
                });
                throw new EasObjectNotFoundException(messageId);
            }
            EasConnectionWrapper.WrapException(delegate()
            {
                response.ThrowIfStatusIsFailed(status);
            }, (ConnectionsTransientException e) => new EasSyncFailedTransientException(e.Message, e), (ConnectionsPermanentException e) => new EasSyncFailedPermanentException(e.Message, e));
        }