Bloom.Api.EnhancedImageServer.IsSimulatedFileUrl C# (CSharp) Method

IsSimulatedFileUrl() protected method

protected IsSimulatedFileUrl ( string localPath ) : bool
localPath string
return bool
        protected bool IsSimulatedFileUrl(string localPath)
        {
            var extension = Path.GetExtension(localPath);
            if(extension != null && !extension.StartsWith(".htm"))
                return false;

            // a good improvement might be to make these urls more obviously cache requests. But for now, let's just see if they are filename guids
            var filename = Path.GetFileNameWithoutExtension(localPath);
            Guid result;
            return Guid.TryParse(filename, out result);
        }