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

Solve() public method

Solve the specified situation by using the storage and remote object id to remove existing db entries and forces a crawl sync by throwing an IOException.
public Solve ( IFileSystemInfo localFile, IObjectId remoteId, ContentChangeType localContent = ContentChangeType.NONE, ContentChangeType remoteContent = ContentChangeType.NONE ) : void
localFile IFileSystemInfo Deleted Local filesystem info instance.
remoteId IObjectId Remote identifier or object.
localContent ContentChangeType Hint if the local content has been changed. Is not used by this solver.
remoteContent ContentChangeType Information if the remote content has been changed. Is not used by this solver.
return void
        public override void Solve(
            IFileSystemInfo localFile,
            IObjectId remoteId,
            ContentChangeType localContent = ContentChangeType.NONE,
            ContentChangeType remoteContent = ContentChangeType.NONE)
        {
            var mappedObject = this.Storage.GetObjectByRemoteId(remoteId.Id);
            this.Storage.RemoveObject(mappedObject);
            throw new IOException(
                string.Format(
                "Local deleted {0} is renamed or moved remotely => invoking crawl sync to download them again",
                mappedObject.Type == MappedObjectType.File ? "file" : "directory"));
        }
    }
LocalObjectDeletedRemoteObjectRenamedOrMoved