Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
243 additions
and
30 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
||
using System; | ||
using System.Collections.ObjectModel; | ||
using System.IO; | ||
using System.Reflection.Emit; | ||
using System.Threading.Tasks; | ||
using Microsoft.Azure.WebJobs.Script.Description; | ||
|
||
namespace Microsoft.Azure.WebJobs.Script.Binding | ||
{ | ||
public class ManualBinding : FunctionBinding | ||
{ | ||
public ManualBinding(ScriptHostConfiguration config, BindingMetadata metadata, FileAccess access) : base (config, metadata, access) | ||
{ | ||
} | ||
|
||
public override Task BindAsync(BindingContext context) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public override Collection<CustomAttributeBuilder> GetCustomAttributes(Type parameterType) | ||
{ | ||
return new Collection<CustomAttributeBuilder>(); | ||
} | ||
} | ||
} |
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
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
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
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
9 changes: 9 additions & 0 deletions
9
test/WebJobs.Script.Tests/TestScripts/Bash/ManualTrigger/function.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"bindings": [ | ||
{ | ||
"type": "manualTrigger", | ||
"name": "input", | ||
"direction": "in" | ||
} | ||
] | ||
} |
2 changes: 2 additions & 0 deletions
2
test/WebJobs.Script.Tests/TestScripts/Bash/ManualTrigger/run.sh
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
input=$(<$input) | ||
echo $input |
9 changes: 9 additions & 0 deletions
9
test/WebJobs.Script.Tests/TestScripts/CSharp/ManualTrigger/function.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"bindings": [ | ||
{ | ||
"type": "manualTrigger", | ||
"name": "input", | ||
"direction": "in" | ||
} | ||
] | ||
} |
7 changes: 7 additions & 0 deletions
7
test/WebJobs.Script.Tests/TestScripts/CSharp/ManualTrigger/run.csx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
using System; | ||
using Microsoft.Azure.WebJobs.Host; | ||
|
||
public static void Run(string input, TraceWriter log) | ||
{ | ||
log.Info(input); | ||
} |
9 changes: 9 additions & 0 deletions
9
test/WebJobs.Script.Tests/TestScripts/FSharp/ManualTrigger/function.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"bindings": [ | ||
{ | ||
"type": "manualTrigger", | ||
"name": "input", | ||
"direction": "in" | ||
} | ||
] | ||
} |
17 changes: 17 additions & 0 deletions
17
test/WebJobs.Script.Tests/TestScripts/FSharp/ManualTrigger/run.fsx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
//---------------------------------------------------------------------------------------- | ||
// This prelude allows scripts to be edited in Visual Studio or another F# editing environment | ||
|
||
#if !COMPILED | ||
#I "../../../../../bin/Binaries/WebJobs.Script.Host" | ||
#r "Microsoft.Azure.WebJobs.Host.dll" | ||
#r "Microsoft.Azure.WebJobs.Extensions.dll" | ||
#endif | ||
|
||
//---------------------------------------------------------------------------------------- | ||
// This is the implementation of the function | ||
|
||
open System | ||
open Microsoft.Azure.WebJobs.Host | ||
|
||
let Run(input: string, log: TraceWriter) = | ||
log.Info(input) |
11 changes: 1 addition & 10 deletions
11
test/WebJobs.Script.Tests/TestScripts/Node/ManualTrigger/index.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,4 @@ | ||
module.exports = function (context, input) { | ||
var logEntry = { | ||
message: 'Node.js manually triggered function called!', | ||
input: input | ||
}; | ||
context.log(logEntry); | ||
context.log('Mathew Charles'); | ||
context.log(null); | ||
context.log(1234); | ||
context.log(true); | ||
|
||
context.log(input); | ||
context.done(); | ||
} |
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
9 changes: 9 additions & 0 deletions
9
test/WebJobs.Script.Tests/TestScripts/Php/ManualTrigger/function.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"bindings": [ | ||
{ | ||
"type": "manualTrigger", | ||
"name": "input", | ||
"direction": "in" | ||
} | ||
] | ||
} |
4 changes: 4 additions & 0 deletions
4
test/WebJobs.Script.Tests/TestScripts/Php/ManualTrigger/run.php
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
$input = file_get_contents(getenv('input')); | ||
fwrite(STDOUT, $input); | ||
?> |
9 changes: 9 additions & 0 deletions
9
test/WebJobs.Script.Tests/TestScripts/PowerShell/ManualTrigger/function.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"bindings": [ | ||
{ | ||
"type": "manualTrigger", | ||
"name": "triggerInput", | ||
"direction": "in" | ||
} | ||
] | ||
} |
2 changes: 2 additions & 0 deletions
2
test/WebJobs.Script.Tests/TestScripts/PowerShell/ManualTrigger/run.ps1
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
$in = Get-Content $triggerInput | ||
echo $in; |
9 changes: 9 additions & 0 deletions
9
test/WebJobs.Script.Tests/TestScripts/Python/ManualTrigger/function.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"bindings": [ | ||
{ | ||
"type": "manualTrigger", | ||
"name": "input", | ||
"direction": "in" | ||
} | ||
] | ||
} |
6 changes: 6 additions & 0 deletions
6
test/WebJobs.Script.Tests/TestScripts/Python/ManualTrigger/run.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import os | ||
|
||
# read the input and write to stdout | ||
input = open(os.environ['input']).read() | ||
message = "Python script processed queue message '{0}'".format(input) | ||
print(input) |
9 changes: 9 additions & 0 deletions
9
test/WebJobs.Script.Tests/TestScripts/WindowsBatch/ManualTrigger/function.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"bindings": [ | ||
{ | ||
"type": "manualTrigger", | ||
"name": "input", | ||
"direction": "in" | ||
} | ||
] | ||
} |
2 changes: 2 additions & 0 deletions
2
test/WebJobs.Script.Tests/TestScripts/WindowsBatch/ManualTrigger/run.bat
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SET /p input=<%input% | ||
echo %input% |
Oops, something went wrong.