Skip to content

Commit

Permalink
Update to latest ApiHub SDK and add support for tracing.
Browse files Browse the repository at this point in the history
  • Loading branch information
safihamid committed May 17, 2016
1 parent c88773b commit 3ed5bb0
Show file tree
Hide file tree
Showing 14 changed files with 80 additions and 75 deletions.
12 changes: 6 additions & 6 deletions src/WebJobs.Script.Host/WebJobs.Script.Host.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -85,27 +85,27 @@
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.WebJobs.Extensions, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.1.1.0-alpha-10287\lib\net45\Microsoft.Azure.WebJobs.Extensions.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.2.0.0-alpha-10292\lib\net45\Microsoft.Azure.WebJobs.Extensions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.WebJobs.Extensions.ApiHub, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.ApiHub.1.0.0-alpha-10287\lib\net45\Microsoft.Azure.WebJobs.Extensions.ApiHub.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.ApiHub.1.0.0-alpha-10292\lib\net45\Microsoft.Azure.WebJobs.Extensions.ApiHub.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.WebJobs.Extensions.DocumentDB, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.DocumentDB.1.0.0-alpha-10287\lib\net45\Microsoft.Azure.WebJobs.Extensions.DocumentDB.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.DocumentDB.1.0.0-alpha-10292\lib\net45\Microsoft.Azure.WebJobs.Extensions.DocumentDB.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.WebJobs.Extensions.MobileApps, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.MobileApps.1.0.0-alpha-10287\lib\net45\Microsoft.Azure.WebJobs.Extensions.MobileApps.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.MobileApps.1.0.0-alpha-10292\lib\net45\Microsoft.Azure.WebJobs.Extensions.MobileApps.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.WebJobs.Extensions.NotificationHubs, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.NotificationHubs.1.0.0-alpha-10287\lib\net45\Microsoft.Azure.WebJobs.Extensions.NotificationHubs.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.NotificationHubs.1.0.0-alpha-10292\lib\net45\Microsoft.Azure.WebJobs.Extensions.NotificationHubs.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.WebJobs.Extensions.SendGrid, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.SendGrid.1.1.0-alpha-10287\lib\net45\Microsoft.Azure.WebJobs.Extensions.SendGrid.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.SendGrid.2.0.0-alpha-10292\lib\net45\Microsoft.Azure.WebJobs.Extensions.SendGrid.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.WebJobs.Host, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
Expand Down
12 changes: 6 additions & 6 deletions src/WebJobs.Script.Host/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
<package id="Microsoft.Azure.ServiceBus.EventProcessorHost" version="1.4.0" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs" version="1.2.0-alpha-10306" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Core" version="1.2.0-alpha-10306" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Extensions" version="1.1.0-alpha-10287" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Extensions.ApiHub" version="1.0.0-alpha-10287" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Extensions.DocumentDB" version="1.0.0-alpha-10287" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Extensions.MobileApps" version="1.0.0-alpha-10287" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Extensions.NotificationHubs" version="1.0.0-alpha-10287" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Extensions.SendGrid" version="1.1.0-alpha-10287" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Extensions" version="2.0.0-alpha-10292" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Extensions.ApiHub" version="1.0.0-alpha-10292" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Extensions.DocumentDB" version="1.0.0-alpha-10292" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Extensions.MobileApps" version="1.0.0-alpha-10292" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Extensions.NotificationHubs" version="1.0.0-alpha-10292" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Extensions.SendGrid" version="2.0.0-alpha-10292" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.ServiceBus" version="1.2.0-alpha-10306" targetFramework="net46" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net46" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net46" />
Expand Down
12 changes: 6 additions & 6 deletions src/WebJobs.Script.NuGet/WebJobs.Script.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
<dependencies>
<dependency id="Microsoft.Azure.WebJobs" version="1.2.0-alpha-10306" />
<dependency id="Microsoft.Azure.WebJobs.ServiceBus" version="1.2.0-alpha-10306" />
<dependency id="Microsoft.Azure.WebJobs.Extensions" version="1.1.0-alpha-10287" />
<dependency id="Microsoft.Azure.WebJobs.Extensions.SendGrid" version="1.1.0-alpha-10287" />
<dependency id="Microsoft.Azure.WebJobs.Extensions.ApiHub" version="1.0.0-alpha-10287" />
<dependency id="Microsoft.Azure.WebJobs.Extensions.DocumentDB" version="1.0.0-alpha-10287" />
<dependency id="Microsoft.Azure.WebJobs.Extensions.MobileApps" version="1.0.0-alpha-10287" />
<dependency id="Microsoft.Azure.WebJobs.Extensions.NotificationHubs" version="1.0.0-alpha-10287" />
<dependency id="Microsoft.Azure.WebJobs.Extensions" version="2.0.0-alpha-10292" />
<dependency id="Microsoft.Azure.WebJobs.Extensions.SendGrid" version="2.0.0-alpha-10292" />
<dependency id="Microsoft.Azure.WebJobs.Extensions.ApiHub" version="1.0.0-alpha-10292" />
<dependency id="Microsoft.Azure.WebJobs.Extensions.DocumentDB" version="1.0.0-alpha-10292" />
<dependency id="Microsoft.Azure.WebJobs.Extensions.MobileApps" version="1.0.0-alpha-10292" />
<dependency id="Microsoft.Azure.WebJobs.Extensions.NotificationHubs" version="1.0.0-alpha-10292" />
<dependency id="Edge.js" version="5.9.1" />
<dependency id="Microsoft.CodeAnalysis.CSharp.Scripting" version="1.1.1" />
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion src/WebJobs.Script.WebHost/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
Expand Down
22 changes: 11 additions & 11 deletions src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.ApiHub.Sdk, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Azure.ApiHub.Sdk.0.6.2\tools\Microsoft.Azure.ApiHub.Sdk.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Azure.ApiHub.Sdk.0.6.5-alpha\lib\net45\Microsoft.Azure.ApiHub.Sdk.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Documents.Client, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Azure.DocumentDB.1.6.3\lib\net45\Microsoft.Azure.Documents.Client.dll</HintPath>
Expand All @@ -137,28 +137,28 @@
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Core.1.2.0-alpha-10306\lib\net45\Microsoft.Azure.WebJobs.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.WebJobs.Extensions, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.1.1.0-alpha-10287\lib\net45\Microsoft.Azure.WebJobs.Extensions.dll</HintPath>
<Reference Include="Microsoft.Azure.WebJobs.Extensions, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.2.0.0-alpha-10292\lib\net45\Microsoft.Azure.WebJobs.Extensions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.WebJobs.Extensions.ApiHub, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.ApiHub.1.0.0-alpha-10287\lib\net45\Microsoft.Azure.WebJobs.Extensions.ApiHub.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.ApiHub.1.0.0-alpha-10292\lib\net45\Microsoft.Azure.WebJobs.Extensions.ApiHub.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.WebJobs.Extensions.DocumentDB, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.DocumentDB.1.0.0-alpha-10287\lib\net45\Microsoft.Azure.WebJobs.Extensions.DocumentDB.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.DocumentDB.1.0.0-alpha-10292\lib\net45\Microsoft.Azure.WebJobs.Extensions.DocumentDB.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.WebJobs.Extensions.MobileApps, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.MobileApps.1.0.0-alpha-10287\lib\net45\Microsoft.Azure.WebJobs.Extensions.MobileApps.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.MobileApps.1.0.0-alpha-10292\lib\net45\Microsoft.Azure.WebJobs.Extensions.MobileApps.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.WebJobs.Extensions.NotificationHubs, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.NotificationHubs.1.0.0-alpha-10287\lib\net45\Microsoft.Azure.WebJobs.Extensions.NotificationHubs.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.NotificationHubs.1.0.0-alpha-10292\lib\net45\Microsoft.Azure.WebJobs.Extensions.NotificationHubs.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.WebJobs.Extensions.SendGrid, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.SendGrid.1.1.0-alpha-10287\lib\net45\Microsoft.Azure.WebJobs.Extensions.SendGrid.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Azure.WebJobs.Extensions.SendGrid.2.0.0-alpha-10292\lib\net45\Microsoft.Azure.WebJobs.Extensions.SendGrid.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.WebJobs.Host, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
Expand Down Expand Up @@ -222,8 +222,8 @@
<HintPath>..\..\packages\ncrontab.2.0.0\lib\net20\NCrontab.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SendGrid, Version=6.3.4.0, Culture=neutral, PublicKeyToken=4f047e93159395ca, processorArchitecture=MSIL">
Expand Down
16 changes: 8 additions & 8 deletions src/WebJobs.Script.WebHost/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@
<package id="Microsoft.AspNet.WebHooks.Receivers.Stripe" version="1.2.0-beta6" targetFramework="net45" />
<package id="Microsoft.AspNet.WebHooks.Receivers.Trello" version="1.2.0-beta6" targetFramework="net45" />
<package id="Microsoft.AspNet.WebHooks.Receivers.WordPress" version="1.2.0-beta6" targetFramework="net45" />
<package id="Microsoft.Azure.ApiHub.Sdk" version="0.6.2" targetFramework="net46" />
<package id="Microsoft.Azure.ApiHub.Sdk" version="0.6.5-alpha" targetFramework="net46" />
<package id="Microsoft.Azure.DocumentDB" version="1.6.3" targetFramework="net46" />
<package id="Microsoft.Azure.Mobile.Client" version="2.0.1" targetFramework="net46" />
<package id="Microsoft.Azure.NotificationHubs" version="1.0.3" targetFramework="net46" />
<package id="Microsoft.Azure.ServiceBus.EventProcessorHost" version="1.4.0" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs" version="1.2.0-alpha-10306" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Core" version="1.2.0-alpha-10306" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Extensions" version="1.1.0-alpha-10287" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Extensions.ApiHub" version="1.0.0-alpha-10287" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Extensions.DocumentDB" version="1.0.0-alpha-10287" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Extensions.MobileApps" version="1.0.0-alpha-10287" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Extensions.NotificationHubs" version="1.0.0-alpha-10287" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Extensions.SendGrid" version="1.1.0-alpha-10287" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Extensions" version="2.0.0-alpha-10292" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Extensions.ApiHub" version="1.0.0-alpha-10292" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Extensions.DocumentDB" version="1.0.0-alpha-10292" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Extensions.MobileApps" version="1.0.0-alpha-10292" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Extensions.NotificationHubs" version="1.0.0-alpha-10292" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Extensions.SendGrid" version="2.0.0-alpha-10292" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.Logging" version="1.2.0-alpha-10306" targetFramework="net46" />
<package id="Microsoft.Azure.WebJobs.ServiceBus" version="1.2.0-alpha-10306" targetFramework="net46" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net46" />
Expand All @@ -51,7 +51,7 @@
<package id="Microsoft.Tpl.Dataflow" version="4.5.24" targetFramework="net452" />
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net46" />
<package id="ncrontab" version="2.0.0" targetFramework="net452" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net46" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net46" />
<package id="Sendgrid" version="6.3.4" targetFramework="net46" />
<package id="SendGrid.SmtpApi" version="1.3.1" targetFramework="net452" />
<package id="StyleCop.MSBuild" version="4.7.50.0" targetFramework="net46" developmentDependency="true" />
Expand Down
2 changes: 1 addition & 1 deletion src/WebJobs.Script/Binding/ApiHubBinding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public override Collection<CustomAttributeBuilder> GetCustomAttributes(Type para
Collection<CustomAttributeBuilder> attributes = new Collection<CustomAttributeBuilder>();

var constructorTypes = new Type[] { typeof(string), typeof(string), typeof(FileAccess) };
var constructorArguments = new object[] { Key, Path, FileAccess.Read };
var constructorArguments = new object[] { Key, Path, Access };

var attribute = new CustomAttributeBuilder(typeof(ApiHubFileAttribute).GetConstructor(constructorTypes), constructorArguments);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ public override void ApplyToConfig(JobHostConfigurationBuilder configBuilder)
connectionString = Utility.GetAppSettingOrEnvironmentValue(Connection);
}

if (apiHubConfig.Logger == null)
{
apiHubConfig.Logger = configBuilder.TraceWriter;
}

apiHubConfig.AddKeyPath(this.Key, connectionString);
}
}
Expand Down
Loading

0 comments on commit 3ed5bb0

Please sign in to comment.