Guest User

Untitled

a guest
Oct 17th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. using System.Collections.Generic;
  2. using Microsoft.Azure.Documents;
  3. using Microsoft.Azure.WebJobs;
  4. using Microsoft.Azure.WebJobs.Host;
  5.  
  6. namespace ChangeFeedFunction
  7. {
  8. public static class RcModelFeed
  9. {
  10. [FunctionName("RcModelFeed")]
  11. public static void Run([CosmosDBTrigger("dojo", "rcmodel", ConnectionStringSetting = "AzureWebJobsDocumentDBConnectionString",
  12. LeaseCollectionName = "leases", LeaseDatabaseName = "dojo")]IReadOnlyList<Document> changeList, TraceWriter log)
  13. {
  14. if (changeList != null && changeList.Count > 0)
  15. {
  16. log.Verbose("Documents modified " + changeList.Count);
  17. var i = 0;
  18.  
  19. foreach (var change in changeList)
  20. {
  21. log.Verbose("document Id of $i: " + change.Id);
  22. log.Verbose(change.ToString()); // Document全体を出力
  23. i++;
  24. }
  25. }
  26. }
  27. }
  28. }
Add Comment
Please, Sign In to add comment