예제 #1
0
        public override bool HasSchemaPropertyChanged(ISyncItem syncItem, int?[] oldChangeTrackingInformation, XmlDocument xmlResponse, MailboxLogger mailboxLogger)
        {
            bool    flag        = false;
            XmlNode xmlItemRoot = xmlResponse.CreateElement("ApplicationData", "AirSync:");

            try
            {
                this.EntityDataObject.Bind(syncItem.NativeItem);
                base.AirSyncDataObject.Bind(xmlItemRoot);
                base.AirSyncDataObject.CopyFrom(this.EntityDataObject);
            }
            catch (Exception ex)
            {
                if (!SyncCommand.IsItemSyncTolerableException(ex))
                {
                    throw;
                }
                if (mailboxLogger != null)
                {
                    mailboxLogger.SetData(MailboxLogDataName.MailboxSyncCommand_HasSchemaPropertyChanged_Exception, ex);
                }
                AirSyncUtility.ExceptionToStringHelper arg = new AirSyncUtility.ExceptionToStringHelper(ex);
                AirSyncDiagnostics.TraceError <AirSyncUtility.ExceptionToStringHelper>(ExTraceGlobals.RequestsTracer, this, "Sync-tolerable Entity conversion Exception was thrown. HasSchemaPropertyChanged() {0}", arg);
                flag = true;
            }
            finally
            {
                this.EntityDataObject.Unbind();
                base.AirSyncDataObject.Unbind();
            }
            if (!flag)
            {
                int?[] array = base.ChangeTrackFilter.UpdateChangeTrackingInformation(xmlItemRoot, oldChangeTrackingInformation);
                AirSyncDiagnostics.TraceDebug <int?[], int?[]>(ExTraceGlobals.RequestsTracer, this, "HasSchemaPropertyChanged oldCCI {0} newCCI {1}", oldChangeTrackingInformation, array);
                flag = !ChangeTrackingFilter.IsEqual(array, oldChangeTrackingInformation);
            }
            return(flag);
        }