Created
July 31, 2012 17:41
-
-
Save davidsavagejr/3218858 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private string GetErrorFromBlob(string blobId) | |
{ | |
var container = CloudStorageAccount.Parse(this.connectionString).CreateCloudBlobClient().GetContainerReference("elmaherrors"); | |
var blob = container.GetBlobReference(blobId); | |
return blob.DownloadText(); | |
} | |
public override ErrorLogEntry GetError(string id) | |
{ | |
var error = CloudStorageAccount.Parse(connectionString).CreateCloudTableClient().GetDataServiceContext().CreateQuery<ErrorEntity>("elmaherrors").Where(e => e.PartitionKey == string.Empty && e.RowKey == id).Single(); | |
return new ErrorLogEntry(this, id, ErrorXml.DecodeString(GetErrorFromBlob(error.BlobId))); | |
} | |
public override int GetErrors(int pageIndex, int pageSize, IList errorEntryList) | |
{ | |
.... | |
if (!String.IsNullOrEmpty(error.BlobId)) | |
{ | |
var e = ErrorXml.DecodeString(GetErrorFromBlob(error.BlobId)); | |
errorEntryList.Add(new ErrorLogEntry(this, error.RowKey, e)); | |
count += 1; | |
} | |
} | |
return count; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment