Blog.Common.Utils.Helpers.ImageHelper.GenerateImagePath C# (CSharp) Method

GenerateImagePath() public method

public GenerateImagePath ( int id, string guid, string storageRoot ) : string
id int
guid string
storageRoot string
return string
        public string GenerateImagePath(int id, string guid, string storageRoot)
        {
            try
            {
                if (string.IsNullOrEmpty(storageRoot) || string.IsNullOrEmpty(guid))
                {
                    throw new BlogException("Empty string in parameters. Provide non-empty strings.");
                }
                return storageRoot.TrimEnd('\\') + @"\" + id + @"\" + guid.TrimEnd('\\') + @"\";
            }
            catch (Exception ex)
            {
                throw new BlogException(ex.Message, ex.InnerException);
            }
        }