Beispiel #1
0
        public async Task Add(BatchTriggerEvent evt)
        {
            this.Value.Files.Add(evt.Name);
            this.Value.BatchId    = evt.Key;
            this.LastUpdate       = DateTime.UtcNow;
            this.Value.LastUpdate = this.LastUpdate;

            if (Value.Files.Count == 4)
            {
                await _service.Insert(Value);
                await Reset();
            }
        }
        public async Task Run(
            [BlobTrigger("testcontainer/{name}", Connection = "BlobStorageConnectionString")] Stream myBlob,
            string name,
            [DurableClient] IDurableClient client,
            ILogger log)
        {
            log.LogInformation($"C# Blob trigger function Processed blob\n Name:{name} \n Size: {myBlob.Length} Bytes");

            // Function input comes from the request content.
            var parts = name.Split(new char[] { '/' });
            var key   = parts[0];
            var input = new BatchTriggerEvent
            {
                Name = name,
                Key  = key
            };
            var entityId = new EntityId("BatchEntity", key);

            await client.SignalEntityAsync(entityId, "Add", input);
        }