コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        public static async Task UpdateLogMessages(StateTableIdentifier identifier, IEnumerable <LogMessage> messages)
        {
            var entry = await GetEntry(identifier);

            entry.Messages = messages;

            await AddOrUpdateStateEntry(entry);
        }
コード例 #4
0
        public static async Task SetState(StateTableIdentifier identifier, string state)
        {
            var entry = await GetEntry(identifier);

            // set the state
            entry.State = state;

            // AddOrUpdate
            await AddOrUpdateStateEntry(entry);
        }
コード例 #5
0
 public StateTableEntity(StateTableIdentifier id)
 {
     this.PartitionKey = id.Owner;
     this.RowKey       = id.DumplingId;
 }
コード例 #6
0
        public static async Task <string> GetState(StateTableIdentifier identifier)
        {
            var entry = await GetEntry(identifier);

            return(entry.State);
        }