CmisSync.Lib.Consumer.SituationSolver.LocalObjectChangedRemoteObjectRenamed.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)
        {
            // Rename local object and call change/change solver
            var savedObject = this.Storage.GetObjectByRemoteId(remoteId.Id);
            string oldPath = localFileSystemInfo.FullName;
            string parentPath = localFileSystemInfo is IFileInfo ? (localFileSystemInfo as IFileInfo).Directory.FullName : (localFileSystemInfo as IDirectoryInfo).Parent.FullName;
            string newPath = Path.Combine(parentPath, (remoteId as ICmisObject).Name);
            this.MoveTo(localFileSystemInfo, oldPath, newPath);
            savedObject.Name = (remoteId as ICmisObject).Name;
            savedObject.Ignored = (remoteId as ICmisObject).AreAllChildrenIgnored();
            this.Storage.SaveMappedObject(savedObject);
            this.changeChangeSolver.Solve(localFileSystemInfo, remoteId, localContent, remoteContent);
        }
LocalObjectChangedRemoteObjectRenamed