public new static async Task <IpfsImageResized> FindAsync(AzureTable table, string ipfsHash, string newSize) { var tr = await table.ExecuteAsync(TableOperation.Retrieve(ipfsHash.ToLowerInvariant().HtmlEncode(), newSize.ToLowerInvariant())).ConfigureAwait(false); if ((HttpStatusCode)tr.HttpStatusCode != HttpStatusCode.NotFound) { return(new IpfsImageResized(table, (DynamicTableEntity)tr.Result)); } return(null); }
public static async Task <WorkRegistryRecord> FindAsync(AzureTable table, string registeredAddress) { var tr = await table.ExecuteAsync(TableOperation.Retrieve(registeredAddress.ToLowerInvariant().HtmlEncode(), string.Empty)).ConfigureAwait(false); if ((HttpStatusCode)tr.HttpStatusCode != HttpStatusCode.NotFound) { return(new WorkRegistryRecord(table, (DynamicTableEntity)tr.Result)); } return(null); }
public static async Task <ProcessInfo> FindAsync(AzureTable table) { var tr = await table.ExecuteAsync(TableOperation.Retrieve(GetPartitionKey(), GetRowKey())).ConfigureAwait(false); if ((HttpStatusCode)tr.HttpStatusCode != HttpStatusCode.NotFound) { return(new ProcessInfo(table, (DynamicTableEntity)tr.Result)); } return(null); }
public static async Task <Contract> FindAsync(AzureTable table, string contractAddress) { if (cachedContracts != null) { return(cachedContracts.FirstOrDefault(x => x.Address == contractAddress)); } var tr = await table.ExecuteAsync(TableOperation.Retrieve(contractAddress.ToLowerInvariant().HtmlEncode(), string.Empty)).ConfigureAwait(false); if ((HttpStatusCode)tr.HttpStatusCode != HttpStatusCode.NotFound) { return(new Contract(table, (DynamicTableEntity)tr.Result)); } return(null); }