Created
June 13, 2018 13:05
-
-
Save thuru-zz/7d564e3d80a2a24987dc72c17a7a00d0 to your computer and use it in GitHub Desktop.
cosmos change feed azure function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Azure.Documents; | |
using System.Collections.Generic; | |
using System; | |
public static async Task Run(IReadOnlyList<Document> input, TraceWriter log) | |
{ | |
foreach(var changeInput in input) | |
{ | |
if(changeInput.GetPropertyValue<string>("city") == "colombo") | |
{ | |
log.Verbose("Something has happened in Colombo"); | |
} | |
else | |
{ | |
log.Verbose("Something has happened in somewhere else"); | |
} | |
} | |
log.Verbose("Document count " + input.Count); | |
log.Verbose("First document Id " + input[0].Id); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment