Skip to content

Instantly share code, notes, and snippets.

@geethanga
Created September 5, 2012 01:11
Show Gist options
  • Save geethanga/3628786 to your computer and use it in GitHub Desktop.
Save geethanga/3628786 to your computer and use it in GitHub Desktop.
public static long GetUniqueId()
{
if (_instance != null)
{
return _instance.NextId("importID");
}
var storageAccount =
CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting("StorageConnectionString"));
IOptimisticDataStore blobDataStore = new BlobOptimisticDataStore(storageAccount, AzureCloudStorageServices.GetStorageContainerName());
_instance = new UniqueIdGenerator(blobDataStore);
return _instance.NextId("importID");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment