예제 #1
0
        public Task UpdateRecordValueAsync(int storageHandle, string type, string id, byte[] value)
        {
            var record = StoredRecords.Single(x => x.Id == id && x.Type == type);

            record.Value = value;
            return(Task.CompletedTask);
        }
예제 #2
0
        public Task UpdateRecordTagsAsync(int storageHandle, string type, string id, string tagsJson)
        {
            var record = StoredRecords.Single(x => x.Id == id && x.Type == type);

            record.Tags = tagsJson;
            return(Task.CompletedTask);
        }
예제 #3
0
        public Task <int> GetRecordAsync(int storageHandle, string type, string id, string optionsJson)
        {
            var record = StoredRecords.Single(x => x.Id == id && x.Type == type);

            var nextRecordHandle = RecordHandles.Keys.MaxOrDefault() + 1;

            RecordHandles.Add(nextRecordHandle, record);

            return(Task.FromResult(nextRecordHandle));
        }