本文整理汇总了C#中System.Guid.GetGuidPathString方法的典型用法代码示例。如果您正苦于以下问题:C# Guid.GetGuidPathString方法的具体用法?C# Guid.GetGuidPathString怎么用?C# Guid.GetGuidPathString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Guid
的用法示例。
在下文中一共展示了Guid.GetGuidPathString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetThumnailUrl
/// <summary>
///
/// </summary>
/// <param name="objectID"></param>
/// <param name="fileName"></param>
/// <param name="imageType"></param>
/// <returns></returns>
public static string GetThumnailUrl(Guid objectID, string fileName, ImageType imageType)
{
if (string.IsNullOrEmpty(fileName) || fileName == "Default.jpg")
{
return string.Format("/images/users/profiles/main/Default{0}.jpg", imageType);
}
return string.Format("/thumb.ashx?o={0}&p={1}&t={2}", objectID.GetGuidPathString(), fileName, imageType);
}
示例2: SaveRawTypeImage
/// <summary>
///
/// </summary>
/// <param name="imageFileName"></param>
/// <param name="imageBytes"></param>
/// <param name="objectID"></param>
/// <param name="imageType"></param>
/// <returns></returns>
public static string SaveRawTypeImage(string imageFileName, byte[] imageBytes, Guid objectID, ImageType imageType)
{
string newImageName = ImageManager.GenerateRandomImgName(imageFileName);
string destinationPath = string.Format("{0}{1}/{2}",
CFImageInfo.GetRootOSDirectory(imageType), objectID.GetGuidPathString(), newImageName);
ImageManager.SaveCorrectlySizedImageUpload(imageFileName, imageBytes, destinationPath,
CFImageInfo.GetImageMaxXAxisSize(imageType),
CFImageInfo.GetImageMaxYAxisSize(imageType));
return newImageName;
}