-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathFunctions.cs
More file actions
33 lines (28 loc) · 974 Bytes
/
Functions.cs
File metadata and controls
33 lines (28 loc) · 974 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using Microsoft.Azure.WebJobs;
using System;
using System.IO;
namespace SimpleMessageBus.Samples.OnPrem
{
/// <summary>
/// This class represents a set of test functions to ensure that Azure WebJobs works locally file FileTriggers.
/// </summary>
public class Functions
{
/// <summary>
///
/// </summary>
/// <param name="file"></param>
/// <param name="converted"></param>
/// <remarks>
/// Drop a file in the "convert" directory, and this function will reverse the contents and write the file to the "converted" directory.
/// </remarks>
public void Converter(
[FileTrigger(@"convert\{name}", "*.txt", autoDelete: true)] string file,
[File(@"converted\{name}", FileAccess.Write)] out string converted)
{
char[] arr = file.ToCharArray();
Array.Reverse(arr);
converted = new string(arr);
}
}
}