CmisSync.Lib.RemoteEventGenerator.AddRemoteContentChangeTypeToFileEvent C# (CSharp) Method

AddRemoteContentChangeTypeToFileEvent() private static method

private static AddRemoteContentChangeTypeToFileEvent ( FileEvent fileEvent, IMappedObject obj, IDocument remoteDoc ) : void
fileEvent CmisSync.Lib.Events.FileEvent
obj IMappedObject
remoteDoc IDocument
return void
        private static void AddRemoteContentChangeTypeToFileEvent(FileEvent fileEvent, IMappedObject obj, IDocument remoteDoc) {
            if (fileEvent == null || obj == null || remoteDoc == null) {
                return;
            }

            byte[] remoteHash = remoteDoc.ContentStreamHash(obj.ChecksumAlgorithmName);
            if (remoteHash != null && remoteHash.SequenceEqual(obj.LastChecksum)) {
                fileEvent.RemoteContent = ContentChangeType.NONE;
            } else {
                fileEvent.RemoteContent = ContentChangeType.CHANGED;
            }
        }
    }