public static async Task <StateTableEntity> GetEntry(StateTableIdentifier identifier) { // retrieve item with identifier var result = await StateTable.ExecuteAsync(TableOperation.Retrieve <StateTableEntity>(identifier.Owner, identifier.DumplingId)); return(result.Result as StateTableEntity); }
public static async Task <string> GetDumpUri(StateTableIdentifier id) { var response = await StateTable.ExecuteAsync(TableOperation.Retrieve <StateTableEntity>(id.Owner, id.DumplingId)); var entity = ((StateTableEntity)response.Result); return(entity.DumpRelics_uri); }
public static async Task UpdateLogMessages(StateTableIdentifier identifier, IEnumerable <LogMessage> messages) { var entry = await GetEntry(identifier); entry.Messages = messages; await AddOrUpdateStateEntry(entry); }
public static async Task SetState(StateTableIdentifier identifier, string state) { var entry = await GetEntry(identifier); // set the state entry.State = state; // AddOrUpdate await AddOrUpdateStateEntry(entry); }
public StateTableEntity(StateTableIdentifier id) { this.PartitionKey = id.Owner; this.RowKey = id.DumplingId; }
public static async Task <string> GetState(StateTableIdentifier identifier) { var entry = await GetEntry(identifier); return(entry.State); }