File tree Expand file tree Collapse file tree 12 files changed +150
-130
lines changed
HttpTriggerWithObject-FSharp Expand file tree Collapse file tree 12 files changed +150
-130
lines changed Original file line number Diff line number Diff line change 11{
2- "bindings" : [
3- {
4- "type" : " apiHubTrigger " ,
5- "connection" : " AzureWebJobsDropBox" ,
6- "direction" : " in" ,
7- "path" : " test/{name}" ,
8- "name" : " input"
9- },
10- {
11- "name" : " output" ,
12- "type" : " apiHub " ,
13- "connection" : " AzureWebJobsDropBox" ,
14- "direction" : " out" ,
15- "path" : " testOut/{name}"
16- }
17- ]
2+ "bindings" : [
3+ {
4+ "type" : " apiHubFileTrigger " ,
5+ "connection" : " AzureWebJobsDropBox" ,
6+ "direction" : " in" ,
7+ "path" : " test/{name}" ,
8+ "name" : " input"
9+ },
10+ {
11+ "name" : " output" ,
12+ "type" : " apiHubFile " ,
13+ "connection" : " AzureWebJobsDropBox" ,
14+ "direction" : " out" ,
15+ "path" : " testOut/{name}"
16+ }
17+ ]
1818}
Original file line number Diff line number Diff line change 11{
2- "bindings" : [
3- {
4- "type" : " blobTrigger" ,
5- "name" : " blob" ,
6- "direction" : " in" ,
7- "path" : " samples-input-csharp /{name}"
8- },
9- {
10- "type" : " blob" ,
11- "name" : " output" ,
12- "direction" : " out" ,
13- "path" : " samples-output-csharp /{name}"
14- }
15- ]
2+ "bindings" : [
3+ {
4+ "type" : " blobTrigger" ,
5+ "name" : " blob" ,
6+ "direction" : " in" ,
7+ "path" : " samples-input-fsharp /{name}"
8+ },
9+ {
10+ "type" : " blob" ,
11+ "name" : " output" ,
12+ "direction" : " out" ,
13+ "path" : " samples-output-fsharp /{name}"
14+ }
15+ ]
1616}
Original file line number Diff line number Diff line change 11{
2- "bindings" : [
3- {
4- "type" : " queueTrigger" ,
5- "direction" : " in" ,
6- "queueName" : " samples-documentdb-csharp"
7- },
8- {
9- "type" : " documentdb" ,
10- "direction" : " out" ,
11- "name" : " newItem" ,
12- "databaseName" : " ItemDb" ,
13- "collectionName" : " ItemCollection" ,
14- "createIfNotExists" : false
15- }
16- ]
2+ "bindings" : [
3+ {
4+ "type" : " queueTrigger" ,
5+ "name" : " input" ,
6+ "direction" : " in" ,
7+ "queueName" : " samples-documentdb-fsharp"
8+ },
9+ {
10+ "type" : " documentdb" ,
11+ "direction" : " out" ,
12+ "name" : " newItem" ,
13+ "databaseName" : " ItemDb" ,
14+ "collectionName" : " ItemCollection" ,
15+ "createIfNotExists" : false
16+ }
17+ ]
1718}
Original file line number Diff line number Diff line change 11{
2- "bindings" : [
3- {
4- "type" : " httpTrigger" ,
5- "direction" : " in" ,
6- "methods" : [ " get" ]
7- },
8- {
9- "type" : " http" ,
10- "direction" : " out"
11- }
12- ]
2+ "bindings" : [
3+ {
4+ "type" : " httpTrigger" ,
5+ "name" : " req" ,
6+ "direction" : " in" ,
7+ "methods" : [ " get" ]
8+ },
9+ {
10+ "type" : " http" ,
11+ "name" : " res" ,
12+ "direction" : " out"
13+ }
14+ ]
1315}
Original file line number Diff line number Diff line change 11{
2- "bindings" : [
3- {
4- "type" : " httpTrigger" ,
5- "direction" : " in" ,
6- "methods" : [ " post" ]
7- },
8- {
9- "type" : " http" ,
10- "direction" : " out"
11- }
12- ]
2+ "bindings" : [
3+ {
4+ "type" : " httpTrigger" ,
5+ "name" : " req" ,
6+ "direction" : " in" ,
7+ "methods" : [ " post" ]
8+ },
9+ {
10+ "type" : " http" ,
11+ "name" : " res" ,
12+ "direction" : " out"
13+ }
14+ ]
1315}
Original file line number Diff line number Diff line change 11{
2- "bindings" : [
3- {
4- "type" : " queueTrigger" ,
5- "direction" : " in" ,
6- "queueName" : " samples-easytables-csharp"
7- },
8- {
9- "type" : " easyTable" ,
10- "name" : " newItem" ,
11- "direction" : " out"
12- }
13- ]
2+ "bindings" : [
3+ {
4+ "type" : " queueTrigger" ,
5+ "name" : " input" ,
6+ "direction" : " in" ,
7+ "queueName" : " samples-mobiletables-fsharp"
8+ },
9+ {
10+ "type" : " mobileTable" ,
11+ "name" : " newItem" ,
12+ "direction" : " out" ,
13+ "connection" : " AzureWebJobs_TestMobileUri"
14+ }
15+ ]
1416}
Original file line number Diff line number Diff line change 11{
2- "bindings" : [
3- {
4- "type" : " queueTrigger" ,
5- "direction" : " in" ,
6- "queueName" : " samples-notificationHub-csharp"
7- },
8- {
9- "type" : " notificationHub" ,
10- "direction" : " out" ,
11- "name" : " messageProperties"
12- }
13- ]
2+ "bindings" : [
3+ {
4+ "type" : " queueTrigger" ,
5+ "name" : " input" ,
6+ "direction" : " in" ,
7+ "queueName" : " samples-notificationHub-fsharp"
8+ },
9+ {
10+ "type" : " notificationHub" ,
11+ "name" : " messageProperties" ,
12+ "direction" : " out"
13+ }
14+ ]
1415}
Original file line number Diff line number Diff line change 1+ //----------------------------------------------------------------------------------------
2+ // This prelude allows scripts to be edited in Visual Studio or another F# editing environment
3+
4+ #if ! COMPILED
5+ #I " ../../bin/Binaries/WebJobs.Script.Host"
6+ #r " Microsoft.Azure.WebJobs.Host.dll"
7+ #endif
8+
9+ //----------------------------------------------------------------------------------------
10+ // This is the implementation of the function
11+
112open System
2- open System. IO
13+ open Microsoft. Azure . WebJobs . Host
314
4- let inputPath = Environment.GetEnvironmentVariable( " input" )
5- let input = File.ReadAllText( inputPath)
6- let message = sprintf " F# script processed queue message '%s '" input
7- Console.Out.WriteLine( message)
15+ let Run ( input : string , log : TraceWriter ) =
16+ log.Info( sprintf " F# script processed queue message '%s '" input)
Original file line number Diff line number Diff line change 11{
2- "bindings" : [
3- {
4- "type" : " timerTrigger" ,
5- "schedule" : " 0 * * * * * " ,
6- "runOnStartup " : true ,
7- "direction" : " in"
8- }
9- ]
2+ "bindings" : [
3+ {
4+ "type" : " timerTrigger" ,
5+ "name" : " timerInfo " ,
6+ "schedule " : " 0 * * * * * " ,
7+ "direction" : " in"
8+ }
9+ ]
1010}
Original file line number Diff line number Diff line change @@ -14,5 +14,5 @@ open System
1414open Microsoft.Azure .WebJobs
1515open Microsoft.Azure .WebJobs .Host
1616
17- let Run ( input : TimerInfo , log : TraceWriter ) =
18- log.Verbose( " C # Timer trigger function executed." );
17+ let Run ( timerInfo : TimerInfo , log : TraceWriter ) =
18+ log.Verbose( " F # Timer trigger function executed." );
You can’t perform that action at this time.
0 commit comments