CmisSync.Lib.Consumer.SituationSolver.LocalObjectRenamedOrMovedRemoteObjectDeleted.Solve C# (CSharp) Method

Solve() public method

public Solve ( IFileSystemInfo localFileSystemInfo, IObjectId remoteId, ContentChangeType localContent, ContentChangeType remoteContent ) : void
localFileSystemInfo IFileSystemInfo
remoteId IObjectId
localContent ContentChangeType
remoteContent ContentChangeType
return void
        public override void Solve(
            IFileSystemInfo localFileSystemInfo,
            IObjectId remoteId,
            ContentChangeType localContent,
            ContentChangeType remoteContent)
        {
            var mappedObject = this.Storage.GetObjectByGuid((Guid)localFileSystemInfo.Uuid);
            this.Storage.RemoveObject(mappedObject);
            if (localFileSystemInfo is IFileInfo) {
                this.secondSolver.Solve(localFileSystemInfo, null, ContentChangeType.CREATED, ContentChangeType.NONE);
            } else if (localFileSystemInfo is IDirectoryInfo) {
                this.secondSolver.Solve(localFileSystemInfo, null, ContentChangeType.NONE, ContentChangeType.NONE);
                var dir = localFileSystemInfo as IDirectoryInfo;
                if (dir.GetFiles().Length > 0 || dir.GetDirectories().Length > 0) {
                    throw new IOException(string.Format("There are unsynced files in local folder {0} => starting crawl sync", dir.FullName));
                }
            }
        }
    }
LocalObjectRenamedOrMovedRemoteObjectDeleted