示例#1
0
        private bool HasChanged(BaseItem item, IHasItemChangeMonitor changeMonitor, IDirectoryService directoryService)
        {
            try
            {
                var hasChanged = changeMonitor.HasChanged(item, directoryService);

                if (hasChanged)
                {
                    Logger.LogDebug("{0} reports change to {1}", changeMonitor.GetType().Name, item.Path ?? item.Name);
                }

                return(hasChanged);
            }
            catch (Exception ex)
            {
                Logger.LogError(ex, "Error in {0}.HasChanged", changeMonitor.GetType().Name);
                return(false);
            }
        }
示例#2
0
 private bool HasChanged(IHasMetadata item, IHasItemChangeMonitor changeMonitor, MetadataStatus status, IDirectoryService directoryService)
 {
     try
     {
         return(changeMonitor.HasChanged(item, status, directoryService));
     }
     catch (Exception ex)
     {
         Logger.ErrorException("Error in {0}.HasChanged", ex, changeMonitor.GetType().Name);
         return(false);
     }
 }
示例#3
0
        private bool HasChanged(IHasMetadata item, IHasItemChangeMonitor changeMonitor, IDirectoryService directoryService)
        {
            try
            {
                var hasChanged = changeMonitor.HasChanged(item, directoryService);

                //if (hasChanged)
                //{
                //    Logger.Debug("{0} reports change to {1}", changeMonitor.GetType().Name, item.Path ?? item.Name);
                //}

                return(hasChanged);
            }
            catch (Exception ex)
            {
                Logger.ErrorException("Error in {0}.HasChanged", ex, changeMonitor.GetType().Name);
                return(false);
            }
        }