Skip to content

Commit

Permalink
Merge pull request #16 from rajeevmv/master
Browse files Browse the repository at this point in the history
Update to use SB 3.0.1 nuget package
  • Loading branch information
affandar committed Aug 26, 2015
2 parents 1d9cecf + e5c7745 commit 9ba73e8
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 47 deletions.
4 changes: 2 additions & 2 deletions Framework/Framework.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
<Reference Include="Microsoft.Data.OData, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Data.OData.5.2.0\lib\net40\Microsoft.Data.OData.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ServiceBus, Version=2.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="Microsoft.ServiceBus, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\WindowsAzure.ServiceBus.2.2.4.0\lib\net40-full\Microsoft.ServiceBus.dll</HintPath>
<HintPath>..\packages\WindowsAzure.ServiceBus.3.0.1\lib\net45-full\Microsoft.ServiceBus.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll</HintPath>
Expand Down
2 changes: 1 addition & 1 deletion Framework/TaskOrchestrationDispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ protected override async Task SafeReleaseWorkItem(SessionWorkItem workItem)
{
try
{
await Task.Factory.FromAsync(workItem.Session.BeginClose, workItem.Session.EndClose, null);
await workItem.Session.CloseAsync();
}
catch (Exception ex)
{
Expand Down
2 changes: 1 addition & 1 deletion Framework/TrackingDispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ protected override async Task SafeReleaseWorkItem(SessionWorkItem workItem)
{
try
{
await Task.Factory.FromAsync(workItem.Session.BeginClose, workItem.Session.EndClose, null);
await workItem.Session.CloseAsync();
}
catch (Exception ex)
{
Expand Down
39 changes: 0 additions & 39 deletions Framework/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
namespace DurableTask
{
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
Expand Down Expand Up @@ -400,44 +399,6 @@ public static T SyncExecuteWithRetries<T>(Func<T> retryAction, string sessionId,
return retVal;
}

public static Task<BrokeredMessage> ReceiveAsync(this QueueClient client, TimeSpan timeout)
{
return Task.Factory.FromAsync<TimeSpan, BrokeredMessage>(client.BeginReceive, client.EndReceive,
timeout, null);
}

public static Task<IEnumerable<BrokeredMessage>> ReceiveBatchAsync(this MessageSession session, int messageCount)
{
return Task.Factory.FromAsync<int, IEnumerable<BrokeredMessage>>(session.BeginReceiveBatch,
session.EndReceiveBatch,
messageCount, null);
}

public static Task<MessageSession> AcceptMessageSessionAsync(this QueueClient client, TimeSpan timeout)
{
return Task.Factory.FromAsync<TimeSpan, MessageSession>(client.BeginAcceptMessageSession,
client.EndAcceptMessageSession,
timeout, null);
}

public static Task SendBatchAsync(this QueueClient queueClient, IEnumerable<BrokeredMessage> messages)
{
var tcs = new TaskCompletionSource<object>();
queueClient.BeginSendBatch(messages, ar =>
{
try
{
queueClient.EndSendBatch(ar);
tcs.SetResult(null);
}
catch (Exception exception)
{
tcs.SetException(exception);
}
}, null);
return tcs.Task;
}

public static string SerializeCause(Exception originalException, DataConverter converter)
{
if (originalException == null)
Expand Down
2 changes: 1 addition & 1 deletion Framework/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
<package id="Newtonsoft.Json" version="5.0.6" targetFramework="net45" />
<package id="System.Spatial" version="5.2.0" targetFramework="net45" />
<package id="WindowsAzure.ServiceBus" version="2.2.4.0" targetFramework="net45" />
<package id="WindowsAzure.ServiceBus" version="3.0.1" targetFramework="net45" />
<package id="WindowsAzure.Storage" version="2.1.0.4" targetFramework="net45" />
</packages>
4 changes: 2 additions & 2 deletions FrameworkUnitTests/FrameworkUnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
<HintPath>..\packages\Microsoft.Data.OData.5.2.0\lib\net40\Microsoft.Data.OData.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.ServiceBus, Version=2.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="Microsoft.ServiceBus, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\WindowsAzure.ServiceBus.2.2.4.0\lib\net40-full\Microsoft.ServiceBus.dll</HintPath>
<HintPath>..\packages\WindowsAzure.ServiceBus.3.0.1\lib\net45-full\Microsoft.ServiceBus.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll</HintPath>
Expand Down
2 changes: 1 addition & 1 deletion FrameworkUnitTests/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
<package id="Newtonsoft.Json" version="5.0.6" targetFramework="net45" />
<package id="System.Spatial" version="5.2.0" targetFramework="net45" />
<package id="WindowsAzure.ServiceBus" version="2.2.4.0" targetFramework="net45" />
<package id="WindowsAzure.ServiceBus" version="3.0.1" targetFramework="net45" />
<package id="WindowsAzure.Storage" version="2.1.0.4" targetFramework="net45" />
</packages>

0 comments on commit 9ba73e8

Please sign in to comment.