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
#r "Microsoft.Azure.Documents.Client" | |
using System; | |
using System.Collections.Generic; | |
using Microsoft.Azure.Documents; | |
public static async Task Run(IReadOnlyList<Document> input, IAsyncCollector<Document> docsToSave) | |
{ | |
foreach(var doc in input){ | |
// work with the document, process or create a new one | |
await docsToSave.AddAsync(doc); |
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
{ | |
"bindings": [ | |
{ | |
"type": "cosmosDBTrigger", | |
"name": "input", | |
"direction": "in", | |
"databaseName": "<name-of-your-monitored-database>", | |
"collectionName": "<name-of-your-monitored-collection>", | |
"connectionStringSetting": "<name-of-connection-string-setting>", | |
"leaseCollectionName": "leases", |
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
{ | |
"bindings": [ | |
{ | |
"type": "cosmosDBTrigger", | |
"name": "input", | |
"direction": "in", | |
"databaseName": "<name-of-your-monitored-database>", | |
"collectionName": "<name-of-your-monitored-collection>", | |
"connectionStringSetting": "<name-of-connection-string-setting>", | |
"leaseCollectionName": "leases", |
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
#r "Microsoft.Azure.Documents.Client" | |
using System; | |
using System.Configuration; | |
using System.Collections.Generic; | |
using Microsoft.Azure.Documents; | |
using Microsoft.Azure.Search; | |
private static string searchServiceName = ConfigurationManager.AppSettings["SearchServiceName"]; | |
private static string searchServiceKey = ConfigurationManager.AppSettings["SearchServiceKey"]; | |
private static SearchServiceClient serviceClient = new SearchServiceClient(searchServiceName, new SearchCredentials(searchServiceKey)); |
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
{ | |
"frameworks": { | |
"net46":{ | |
"dependencies": { | |
"Microsoft.Azure.Search": "3.0.5" | |
} | |
} | |
} | |
} |
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
{ | |
"name": "john", | |
"born": "1983-05-07", | |
"id": "f08cfd6b-303e-654b-9c49-41a47ebbeae7" | |
} |
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
#r "Microsoft.Azure.Documents.Client" | |
using Microsoft.Azure.Documents; | |
using Microsoft.Azure.Documents.Client; | |
using System.Net; | |
using System.Configuration; | |
using Microsoft.Azure.KeyVault; | |
using Microsoft.Azure.Services.AppAuthentication; | |
private static HttpClient httpClient = new HttpClient(); | |
private static DocumentClient client = null; |
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
{ | |
"bindings": [ | |
{ | |
"name": "req", | |
"type": "httpTrigger", | |
"direction": "in" | |
}, | |
{ | |
"name": "$return", | |
"type": "http", |
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
{ | |
"frameworks": { | |
"net46":{ | |
"dependencies": { | |
"Microsoft.Azure.KeyVault": "2.3.2", | |
"Microsoft.Azure.Services.AppAuthentication": "1.1.0-preview" | |
} | |
} | |
} | |
} |