CmisSync.Lib.Consumer.SituationSolver.AbstractEnhancedSolver.EnsureThatLocalFileNameContainsLegalCharacters C# (CSharp) Метод

EnsureThatLocalFileNameContainsLegalCharacters() защищенный Метод

Ensures the that local file name contains legal characters. If the given file contains UTF-8 only character and the given exception has been returned from the server on creating a file/folder, an interaction exception is thrown with a hint about the problem. Otherwise nothing happens.
protected EnsureThatLocalFileNameContainsLegalCharacters ( IFileSystemInfo localFile, DotCMIS.Exceptions.CmisConstraintException e ) : void
localFile IFileSystemInfo Local file which produces a CmisConstraintException on the server.
e DotCMIS.Exceptions.CmisConstraintException The returned CmisConstraintException returned by the server.
Результат void
        protected void EnsureThatLocalFileNameContainsLegalCharacters(IFileSystemInfo localFile, CmisConstraintException e) {
            if (!Utils.IsValidISO885915(localFile.Name)) {
                OperationsLogger.Warn(string.Format("Server denied creation of {0}, perhaps because it contains a UTF-8 character", localFile.Name), e);
                throw new InteractionNeededException(string.Format("Server denied creation of {0}", localFile.Name), e) {
                    Title = string.Format("Server denied creation of {0}", localFile.Name),
                    Description = string.Format("Server denied creation of {0}, perhaps because it contains a UTF-8 character", localFile.FullName)
                };
            }
        }
    }