private async Task FlushToBlobAsync() { var contractToSave = GetContractToSave(); await _azurePageBlob.WriteAsProtobufAsync(contractToSave); Console.WriteLine("Last Compressed pages state is saved to disk"); _hasDataToUpdate = false; }
public async ValueTask SaveAsync(IEnumerable <TopicAndQueuesSnapshotGrpcModel> snapshot) { await CreateIfNotExistsAsync(); var dataToSave = new List <TopicAndQueuesBlobContract>(); foreach (var topicData in snapshot) { var topicDataToSave = TopicAndQueuesBlobContract.Create(topicData); dataToSave.Add(topicDataToSave); } await _azurePageBlob.WriteAsProtobufAsync(dataToSave); }