1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- using System;
- using System.Collections.Generic;
- using System.Text.Json;
- using Microsoft.Azure.Functions.Worker;
- using Microsoft.Extensions.Logging;
- namespace TEAMModelOS.FunctionV4
- {
- public class Function1
- {
- //[FunctionName("Function1")]
- //public static void Run([CosmosDBTrigger(
- // databaseName: "TEAMModelOS",
- // collectionName: "Common",
- // ConnectionStringSetting = "Azure:Cosmos:ConnectionString",
- // LeaseCollectionName = "leases")]IReadOnlyList<Document> input,
- // ILogger log)
- //{
- // if (input != null && input.Count > 0)
- // {
- // log.LogInformation("Documents modified " + input.Count);
- // log.LogInformation("First document Id " + input[0].Id);
- // }
- // }
- [Function("Function1")]
- public void Run([CosmosDBTrigger(
- databaseName: "TEAMModelOS",
- containerName: "Common",
- Connection = "Azure:Cosmos:ConnectionString",
- LeaseContainerName = "leases",
- //LeaseContainerPrefix = "TEAMModelOS",
- CreateLeaseContainerIfNotExists =true)]IReadOnlyList<JsonElement> input,
- ILogger log)
- {
- if (input != null && input.Count > 0)
- {
- //log.LogInformation("Documents modified " + input.Count);
- //log.LogInformation("First document Id " + input[0].Id);
- }
- }
- }
- }
|