Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static string GenerateFileName2(CloudBlobDirectory container, string uploadFilePrefix)
- {
- DateTime now = DateTime.Now;
- string nowString = now.ToString(CultureInfo.CurrentCulture.DateTimeFormat.SortableDateTimePattern);
- string result = uploadFilePrefix + nowString + "_000";
- var blob = container.GetBlockBlobReference(result);
- int i = 1;
- while (blob.Exists())
- {
- result = uploadFilePrefix + nowString + "_" + (i++).ToString("000");
- blob = container.GetBlockBlobReference(result);
- }
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement