fs4net.Framework.Impl.FilenameParser.ValidateExtension C# (CSharp) Méthode

ValidateExtension() private méthode

private ValidateExtension ( ) : void
Résultat void
        private void ValidateExtension()
        {
            var extension = Path.GetExtension(_filename);
            var filenameWithoutExtension = Path.GetFileNameWithoutExtension(_filename);
            _validator.Ensure<InvalidPathException>(!filenameWithoutExtension.IsEmpty() || !extension.IsEmpty(), "The filename of the path '{0}' is empty.");
            _validator.Ensure<InvalidPathException>(filenameWithoutExtension.IsEmpty() || !Char.IsWhiteSpace(filenameWithoutExtension.Last()), "The filename of the path '{0}' ends with a whitespace which is not allowed.");
        }