Ejemplo n.º 1
0
        public virtual string GetSizeName(string fileName)
        {
            int separatorIndex;
            int dotIndex;

            if (!TryGetSeparatorAndDotIndex(fileName, out separatorIndex, out dotIndex))
            {
                return(null);
            }

            var sizeName = fileName.Substring(separatorIndex + 1, dotIndex - separatorIndex - 1);

            if (!ImageSizes.Contains(sizeName))
            {
                return(null);
            }

            return(sizeName);
        }