Skip to content

Commit 4dd6288

Browse files
committed
adding easytables
1 parent ba9408b commit 4dd6288

38 files changed

+783
-106
lines changed

WebJobs.Script.sln

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,18 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BlobTrigger-Batch", "BlobTr
160160
sample\BlobTrigger-Batch\run.bat = sample\BlobTrigger-Batch\run.bat
161161
EndProjectSection
162162
EndProject
163+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EasyTable-CSharp", "EasyTable-CSharp", "{B51AE854-21D2-49D2-B83D-9FA18780A175}"
164+
ProjectSection(SolutionItems) = preProject
165+
sample\EasyTables-CSharp\function.json = sample\EasyTables-CSharp\function.json
166+
sample\EasyTables-CSharp\run.csx = sample\EasyTables-CSharp\run.csx
167+
EndProjectSection
168+
EndProject
169+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EasyTable-Node", "EasyTable-Node", "{87E44645-EA02-4F12-8C3E-820B5710292D}"
170+
ProjectSection(SolutionItems) = preProject
171+
sample\EasyTables-Node\function.json = sample\EasyTables-Node\function.json
172+
sample\EasyTables-Node\index.js = sample\EasyTables-Node\index.js
173+
EndProjectSection
174+
EndProject
163175
Global
164176
GlobalSection(SolutionConfigurationPlatforms) = preSolution
165177
Debug|Any CPU = Debug|Any CPU
@@ -218,5 +230,7 @@ Global
218230
{15BA01AE-580C-4FBB-A117-F3B112B4BD02} = {FF9C0818-30D3-437A-A62D-7A61CA44F459}
219231
{B80C88CF-68EE-4400-A68D-216F1F85179C} = {FF9C0818-30D3-437A-A62D-7A61CA44F459}
220232
{C23BB3D1-6921-4FCF-8E45-09540E1F986E} = {FF9C0818-30D3-437A-A62D-7A61CA44F459}
233+
{B51AE854-21D2-49D2-B83D-9FA18780A175} = {FF9C0818-30D3-437A-A62D-7A61CA44F459}
234+
{87E44645-EA02-4F12-8C3E-820B5710292D} = {FF9C0818-30D3-437A-A62D-7A61CA44F459}
221235
EndGlobalSection
222236
EndGlobal
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
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+
]
14+
}

sample/EasyTables-CSharp/run.csx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using System;
2+
3+
public static void Run(string input, out Item newItem)
4+
{
5+
newItem = new Item
6+
{
7+
Text = "Hello from C#! " + input
8+
};
9+
}
10+
11+
public class Item
12+
{
13+
public string Id { get; set; }
14+
public string Text { get; set; }
15+
public bool IsProcessed { get; set; }
16+
public DateTimeOffset ProcessedAt { get; set; }
17+
18+
// EasyTable properties
19+
public DateTimeOffset CreatedAt { get; set; }
20+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"bindings": [
3+
{
4+
"type": "queueTrigger",
5+
"direction": "in",
6+
"queueName": "samples-easytables-node"
7+
},
8+
{
9+
"type": "easyTable",
10+
"direction": "out",
11+
"name": "item",
12+
"tableName": "Item"
13+
}
14+
]
15+
}

sample/EasyTables-Node/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = function (context, input) {
2+
context.log('Node.js triggered function via EasyTables called with input ' + input);
3+
4+
context.bindings.item = {
5+
Text: "Hello from Node! " + input
6+
};
7+
8+
context.done();
9+
}

src/WebJobs.Script.Host/App.config

Lines changed: 39 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,43 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<runtime>
4-
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
5-
<dependentAssembly>
6-
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
7-
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
8-
</dependentAssembly>
9-
<dependentAssembly>
10-
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
11-
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
12-
</dependentAssembly>
13-
<dependentAssembly>
14-
<assemblyIdentity name="System.IdentityModel.Tokens.Jwt" publicKeyToken="31bf3856ad364e35" culture="neutral" />
15-
<bindingRedirect oldVersion="0.0.0.0-4.0.20511.1437" newVersion="4.0.20511.1437" />
16-
</dependentAssembly>
17-
<dependentAssembly>
18-
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
19-
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
20-
</dependentAssembly>
21-
<dependentAssembly>
22-
<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
23-
<bindingRedirect oldVersion="0.0.0.0-4.3.1.0" newVersion="4.3.1.0" />
24-
</dependentAssembly>
25-
<dependentAssembly>
26-
<assemblyIdentity name="Microsoft.Azure.WebJobs.Host" publicKeyToken="31bf3856ad364e35" culture="neutral" />
27-
<bindingRedirect oldVersion="0.0.0.0-1.1.2.0" newVersion="1.1.2.0" />
28-
</dependentAssembly>
29-
<dependentAssembly>
30-
<assemblyIdentity name="Microsoft.Azure.WebJobs" publicKeyToken="31bf3856ad364e35" culture="neutral" />
31-
<bindingRedirect oldVersion="0.0.0.0-1.1.2.0" newVersion="1.1.2.0" />
32-
</dependentAssembly>
33-
<dependentAssembly>
34-
<assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral" />
35-
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
36-
</dependentAssembly>
37-
</assemblyBinding>
38-
</runtime>
4+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
5+
<dependentAssembly>
6+
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
7+
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
8+
</dependentAssembly>
9+
<dependentAssembly>
10+
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
11+
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
12+
</dependentAssembly>
13+
<dependentAssembly>
14+
<assemblyIdentity name="System.IdentityModel.Tokens.Jwt" publicKeyToken="31bf3856ad364e35" culture="neutral" />
15+
<bindingRedirect oldVersion="0.0.0.0-4.0.20511.1437" newVersion="4.0.20511.1437" />
16+
</dependentAssembly>
17+
<dependentAssembly>
18+
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
19+
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
20+
</dependentAssembly>
21+
<dependentAssembly>
22+
<assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
23+
<bindingRedirect oldVersion="0.0.0.0-4.3.1.0" newVersion="4.3.1.0" />
24+
</dependentAssembly>
25+
<dependentAssembly>
26+
<assemblyIdentity name="Microsoft.Azure.WebJobs.Host" publicKeyToken="31bf3856ad364e35" culture="neutral" />
27+
<bindingRedirect oldVersion="0.0.0.0-1.1.2.0" newVersion="1.1.2.0" />
28+
</dependentAssembly>
29+
<dependentAssembly>
30+
<assemblyIdentity name="Microsoft.Azure.WebJobs" publicKeyToken="31bf3856ad364e35" culture="neutral" />
31+
<bindingRedirect oldVersion="0.0.0.0-1.1.2.0" newVersion="1.1.2.0" />
32+
</dependentAssembly>
33+
<dependentAssembly>
34+
<assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral" />
35+
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
36+
</dependentAssembly>
37+
<dependentAssembly>
38+
<assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
39+
<bindingRedirect oldVersion="0.0.0.0-4.2.29.0" newVersion="4.2.29.0" />
40+
</dependentAssembly>
41+
</assemblyBinding>
42+
</runtime>
3943
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" /></startup></configuration>

src/WebJobs.Script.Host/WebJobs.Script.Host.csproj

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,15 @@
6868
<Private>True</Private>
6969
</Reference>
7070
<Reference Include="Microsoft.Azure.WebJobs.Extensions, Version=1.0.2.0, Culture=neutral, processorArchitecture=MSIL">
71-
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.1.0.2-alpha-10232\lib\net45\Microsoft.Azure.WebJobs.Extensions.dll</HintPath>
71+
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.1.0.2-alpha-10251\lib\net45\Microsoft.Azure.WebJobs.Extensions.dll</HintPath>
72+
<Private>True</Private>
73+
</Reference>
74+
<Reference Include="Microsoft.Azure.WebJobs.Extensions.EasyTables, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
75+
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.EasyTables.1.0.0-alpha-10251\lib\net45\Microsoft.Azure.WebJobs.Extensions.EasyTables.dll</HintPath>
7276
<Private>True</Private>
7377
</Reference>
7478
<Reference Include="Microsoft.Azure.WebJobs.Extensions.SendGrid, Version=1.0.2.0, Culture=neutral, processorArchitecture=MSIL">
75-
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.SendGrid.1.0.2-alpha-10232\lib\net45\Microsoft.Azure.WebJobs.Extensions.SendGrid.dll</HintPath>
79+
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.SendGrid.1.0.2-alpha-10251\lib\net45\Microsoft.Azure.WebJobs.Extensions.SendGrid.dll</HintPath>
7680
<Private>True</Private>
7781
</Reference>
7882
<Reference Include="Microsoft.Azure.WebJobs.Host, Version=1.1.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -107,6 +111,14 @@
107111
<HintPath>..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll</HintPath>
108112
<Private>True</Private>
109113
</Reference>
114+
<Reference Include="Microsoft.WindowsAzure.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
115+
<HintPath>..\..\packages\Microsoft.Azure.Mobile.Client.2.0.1\lib\net45\Microsoft.WindowsAzure.Mobile.dll</HintPath>
116+
<Private>True</Private>
117+
</Reference>
118+
<Reference Include="Microsoft.WindowsAzure.Mobile.Ext, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
119+
<HintPath>..\..\packages\Microsoft.Azure.Mobile.Client.2.0.1\lib\net45\Microsoft.WindowsAzure.Mobile.Ext.dll</HintPath>
120+
<Private>True</Private>
121+
</Reference>
110122
<Reference Include="Microsoft.WindowsAzure.Storage, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
111123
<HintPath>..\..\packages\WindowsAzure.Storage.4.3.0\lib\net40\Microsoft.WindowsAzure.Storage.dll</HintPath>
112124
<Private>True</Private>
@@ -134,10 +146,19 @@
134146
<Reference Include="System" />
135147
<Reference Include="System.Data" />
136148
<Reference Include="System.Net.Http" />
149+
<Reference Include="System.Net.Http.Extensions, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
150+
<HintPath>..\..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll</HintPath>
151+
<Private>True</Private>
152+
</Reference>
137153
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
138154
<HintPath>..\..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
139155
<Private>True</Private>
140156
</Reference>
157+
<Reference Include="System.Net.Http.Primitives, Version=4.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
158+
<HintPath>..\..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll</HintPath>
159+
<Private>True</Private>
160+
</Reference>
161+
<Reference Include="System.Net.Http.WebRequest" />
141162
<Reference Include="System.Runtime.Serialization" />
142163
<Reference Include="System.ServiceModel" />
143164
<Reference Include="System.Spatial, Version=5.6.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -176,7 +197,9 @@
176197
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
177198
</PropertyGroup>
178199
<Error Condition="!Exists('..\..\packages\StyleCop.MSBuild.4.7.50.0\build\StyleCop.MSBuild.Targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\StyleCop.MSBuild.4.7.50.0\build\StyleCop.MSBuild.Targets'))" />
200+
<Error Condition="!Exists('..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
179201
</Target>
202+
<Import Project="..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
180203
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
181204
Other similar extension points exist, see Microsoft.Common.targets.
182205
<Target Name="BeforeBuild">

src/WebJobs.Script.Host/packages.config

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,20 @@
66
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net45" />
77
<package id="Microsoft.AspNet.WebHooks.Common" version="1.2.0-rc1" targetFramework="net46" />
88
<package id="Microsoft.AspNet.WebHooks.Receivers" version="1.2.0-beta6" targetFramework="net46" />
9+
<package id="Microsoft.Azure.Mobile.Client" version="2.0.1" targetFramework="net46" />
910
<package id="Microsoft.Azure.ServiceBus.EventProcessorHost" version="1.4.0" targetFramework="net46" />
1011
<package id="Microsoft.Azure.WebJobs" version="1.1.2-alpha-10267" targetFramework="net46" />
1112
<package id="Microsoft.Azure.WebJobs.Core" version="1.1.2-alpha-10267" targetFramework="net46" />
12-
<package id="Microsoft.Azure.WebJobs.Extensions" version="1.0.2-alpha-10232" targetFramework="net46" />
13-
<package id="Microsoft.Azure.WebJobs.Extensions.SendGrid" version="1.0.2-alpha-10232" targetFramework="net46" />
13+
<package id="Microsoft.Azure.WebJobs.Extensions" version="1.0.2-alpha-10251" targetFramework="net46" />
14+
<package id="Microsoft.Azure.WebJobs.Extensions.EasyTables" version="1.0.0-alpha-10251" targetFramework="net46" />
15+
<package id="Microsoft.Azure.WebJobs.Extensions.SendGrid" version="1.0.2-alpha-10251" targetFramework="net46" />
1416
<package id="Microsoft.Azure.WebJobs.ServiceBus" version="1.1.2-alpha-10267" targetFramework="net46" />
17+
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net46" />
18+
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net46" />
1519
<package id="Microsoft.Data.Edm" version="5.6.2" targetFramework="net45" />
1620
<package id="Microsoft.Data.OData" version="5.6.2" targetFramework="net45" />
1721
<package id="Microsoft.Data.Services.Client" version="5.6.2" targetFramework="net45" />
22+
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="net46" />
1823
<package id="Microsoft.Tpl.Dataflow" version="4.5.24" targetFramework="net45" />
1924
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
2025
<package id="ncrontab" version="2.0.0" targetFramework="net45" />

src/WebJobs.Script.NuGet/WebJobs.Script.nuproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<ItemGroup>
1111
<ProjectReference Include="..\WebJobs.Script\WebJobs.Script.csproj">
1212
<Project>{E6F59990-F3A1-469F-A9D8-6D529121D385}</Project>
13-
<Name>WebJobs.Script</Name>
13+
<Name>WebJobs.Script</Name>
1414
</ProjectReference>
1515
</ItemGroup>
1616
<ItemGroup>
@@ -22,6 +22,10 @@
2222
</NuGetContent>-->
2323
</ItemGroup>
2424
<Import Project="$(WebJobsToolsPath)NuGetProj.targets"/>
25+
26+
<!-- This is required to properly resolve dependencies during the Nuget package build -->
27+
<Import Project="..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
28+
2529
<Target Name="BeforeBuild">
2630
<PropertyGroup>
2731
<!-- Define properties you want to use inside your nuspec file. -->
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
This is required to live alongside WebJobs.EasyTables.nuproj. If it is not here
4+
the build will fail due to Bcl.Build missing some required packages.
5+
-->
6+
<packages>
7+
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net45" />
8+
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net45" />
9+
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="net45" />
10+
</packages>

0 commit comments

Comments
 (0)