Skip to content

Commit 6583f1e

Browse files
committed
Updated to use the latest packages.
1 parent 7839dc7 commit 6583f1e

File tree

7 files changed

+63
-51
lines changed

7 files changed

+63
-51
lines changed

QueueStorage/Advanced.cs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,15 @@
1414
// places, or events is intended or should be inferred.
1515
//----------------------------------------------------------------------------------
1616

17-
using Microsoft.WindowsAzure;
18-
using Microsoft.WindowsAzure.Storage;
19-
using Microsoft.WindowsAzure.Storage.Queue;
17+
using Microsoft.Azure;
18+
using Microsoft.Azure.Storage;
19+
using Microsoft.Azure.Storage.Queue;
20+
using Microsoft.Azure.Storage.Queue.Protocol;
21+
using Microsoft.Azure.Storage.RetryPolicies;
22+
using Microsoft.Azure.Storage.Shared.Protocol;
2023
using System;
2124
using System.Collections.Generic;
22-
using System.Linq;
2325
using System.Threading.Tasks;
24-
using Microsoft.WindowsAzure.Storage.Queue.Protocol;
25-
using Microsoft.WindowsAzure.Storage.RetryPolicies;
26-
using Microsoft.WindowsAzure.Storage.Shared.Protocol;
2726

2827
namespace QueueStorage
2928
{
@@ -336,10 +335,12 @@ private static async Task QueueAclSample(CloudQueueClient cloudQueueClient)
336335
}
337336

338337
// Set queue permissions
339-
SharedAccessQueuePolicy accessQueuePolicy = new SharedAccessQueuePolicy();
340-
accessQueuePolicy.SharedAccessStartTime = new DateTimeOffset(DateTime.Now);
341-
accessQueuePolicy.SharedAccessExpiryTime = new DateTimeOffset(DateTime.Now.AddMinutes(10));
342-
accessQueuePolicy.Permissions = SharedAccessQueuePermissions.Update;
338+
SharedAccessQueuePolicy accessQueuePolicy = new SharedAccessQueuePolicy
339+
{
340+
SharedAccessStartTime = new DateTimeOffset(DateTime.Now),
341+
SharedAccessExpiryTime = new DateTimeOffset(DateTime.Now.AddMinutes(10)),
342+
Permissions = SharedAccessQueuePermissions.Update
343+
};
343344
QueuePermissions permissions = new QueuePermissions();
344345
permissions.SharedAccessPolicies.Add("key1", accessQueuePolicy);
345346
Console.WriteLine("Set queue permissions");

QueueStorage/App.config

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,20 @@
44
<!-- By default we are assuming you will use the Azure SDK Storage Emulator. If you have an Azure Subscription you can alternatively
55
create a Storage Account and run against the storage service by commenting out the connection string below and using the
66
second connection string - in which case you must also insert your storage account name and key in the line below. -->
7-
<!-- <add key="StorageConnectionString" value = "UseDevelopmentStorage=true;"/> -->
7+
<add key="StorageConnectionString" value = "UseDevelopmentStorage=true;"/>
88
<!--<add key="StorageConnectionString" value="DefaultEndpointsProtocol=https;AccountName=[AccountName];AccountKey=[AccountKey]" />-->
99
</appSettings>
10+
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /></startup>
11+
<runtime>
12+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
13+
<dependentAssembly>
14+
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
15+
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
16+
</dependentAssembly>
17+
<dependentAssembly>
18+
<assemblyIdentity name="Microsoft.Azure.KeyVault.Core" publicKeyToken="31bf3856ad364e35" culture="neutral" />
19+
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
20+
</dependentAssembly>
21+
</assemblyBinding>
22+
</runtime>
1023
</configuration>

QueueStorage/Common.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Microsoft.WindowsAzure.Storage;
1+
using Microsoft.Azure.Storage;
22
using System;
33

44
namespace QueueStorage

QueueStorage/GettingStarted.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
// places, or events is intended or should be inferred.
1515
//----------------------------------------------------------------------------------
1616

17-
using Microsoft.WindowsAzure;
18-
using Microsoft.WindowsAzure.Storage;
19-
using Microsoft.WindowsAzure.Storage.Queue;
17+
using Microsoft.Azure;
18+
using Microsoft.Azure.Storage;
19+
using Microsoft.Azure.Storage.Queue;
2020
using System;
2121
using System.Threading.Tasks;
2222

@@ -129,7 +129,7 @@ public async Task UpdateEnqueuedMessageAsync(CloudQueue queue)
129129

130130
Console.WriteLine("6. Change the contents of a queued message");
131131
CloudQueueMessage message = await queue.GetMessageAsync();
132-
message.SetMessageContent("Updated contents.");
132+
message.SetMessageContent2("Updated contents.", false);
133133
await queue.UpdateMessageAsync(
134134
message,
135135
TimeSpan.Zero, // For the purpose of the sample make the update visible immediately

QueueStorage/Program.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@
1414
// places, or events is intended or should be inferred.
1515
//----------------------------------------------------------------------------------
1616

17-
using Microsoft.WindowsAzure;
18-
using Microsoft.WindowsAzure.Storage;
19-
using Microsoft.WindowsAzure.Storage.Queue;
2017
using System;
21-
using System.Threading.Tasks;
2218

2319
namespace QueueStorage
2420
{
@@ -60,7 +56,7 @@ public class Program
6056
// 3. Set breakpoints and run the project using F10.
6157
//
6258
// *************************************************************************************************************************
63-
public static void Main(string[] args)
59+
public static void Main()
6460
{
6561
Console.WriteLine("Azure Storage Queue Sample\n");
6662

QueueStorage/QueueStorage.csproj

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>QueueStorage</RootNamespace>
1111
<AssemblyName>QueueStorage</AssemblyName>
12-
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
15+
<TargetFrameworkProfile />
1516
</PropertyGroup>
1617
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1718
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -33,35 +34,34 @@
3334
<WarningLevel>4</WarningLevel>
3435
</PropertyGroup>
3536
<ItemGroup>
36-
<Reference Include="Microsoft.Data.Edm, Version=5.6.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
37-
<HintPath>..\packages\Microsoft.Data.Edm.5.6.2\lib\net40\Microsoft.Data.Edm.dll</HintPath>
38-
<Private>True</Private>
37+
<Reference Include="Microsoft.Azure.ConfigurationManager, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
38+
<HintPath>..\packages\Microsoft.Azure.ConfigurationManager.4.0.0\lib\net452\Microsoft.Azure.ConfigurationManager.dll</HintPath>
3939
</Reference>
40-
<Reference Include="Microsoft.Data.OData, Version=5.6.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
41-
<HintPath>..\packages\Microsoft.Data.OData.5.6.2\lib\net40\Microsoft.Data.OData.dll</HintPath>
42-
<Private>True</Private>
40+
<Reference Include="Microsoft.Azure.KeyVault.Core, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
41+
<HintPath>..\packages\Microsoft.Azure.KeyVault.Core.3.0.3\lib\net452\Microsoft.Azure.KeyVault.Core.dll</HintPath>
4342
</Reference>
44-
<Reference Include="Microsoft.Data.Services.Client, Version=5.6.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
45-
<HintPath>..\packages\Microsoft.Data.Services.Client.5.6.2\lib\net40\Microsoft.Data.Services.Client.dll</HintPath>
46-
<Private>True</Private>
43+
<Reference Include="Microsoft.Azure.Storage.Common, Version=10.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
44+
<HintPath>..\packages\Microsoft.Azure.Storage.Common.10.0.2\lib\net452\Microsoft.Azure.Storage.Common.dll</HintPath>
4745
</Reference>
48-
<Reference Include="Microsoft.WindowsAzure.Configuration, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
49-
<HintPath>..\packages\Microsoft.WindowsAzure.ConfigurationManager.1.8.0.0\lib\net35-full\Microsoft.WindowsAzure.Configuration.dll</HintPath>
50-
<Private>True</Private>
46+
<Reference Include="Microsoft.Azure.Storage.Queue, Version=10.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
47+
<HintPath>..\packages\Microsoft.Azure.Storage.Queue.10.0.2\lib\net452\Microsoft.Azure.Storage.Queue.dll</HintPath>
5148
</Reference>
52-
<Reference Include="Microsoft.WindowsAzure.Storage, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
53-
<HintPath>..\packages\WindowsAzure.Storage.4.3.0\lib\net40\Microsoft.WindowsAzure.Storage.dll</HintPath>
54-
<Private>True</Private>
49+
<Reference Include="Microsoft.Data.Edm, Version=5.8.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
50+
<HintPath>..\packages\Microsoft.Data.Edm.5.8.4\lib\net40\Microsoft.Data.Edm.dll</HintPath>
5551
</Reference>
56-
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
57-
<HintPath>..\packages\Newtonsoft.Json.5.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
58-
<Private>True</Private>
52+
<Reference Include="Microsoft.Data.OData, Version=5.8.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
53+
<HintPath>..\packages\Microsoft.Data.OData.5.8.4\lib\net40\Microsoft.Data.OData.dll</HintPath>
54+
</Reference>
55+
<Reference Include="Microsoft.Data.Services.Client, Version=5.8.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
56+
<HintPath>..\packages\Microsoft.Data.Services.Client.5.8.4\lib\net40\Microsoft.Data.Services.Client.dll</HintPath>
57+
</Reference>
58+
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
59+
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
5960
</Reference>
6061
<Reference Include="System" />
6162
<Reference Include="System.Core" />
62-
<Reference Include="System.Spatial, Version=5.6.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
63-
<HintPath>..\packages\System.Spatial.5.6.2\lib\net40\System.Spatial.dll</HintPath>
64-
<Private>True</Private>
63+
<Reference Include="System.Spatial, Version=5.8.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
64+
<HintPath>..\packages\System.Spatial.5.8.4\lib\net40\System.Spatial.dll</HintPath>
6565
</Reference>
6666
<Reference Include="System.Xml.Linq" />
6767
<Reference Include="System.Data.DataSetExtensions" />

QueueStorage/packages.config

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Microsoft.Data.Edm" version="5.6.2" targetFramework="net452" />
4-
<package id="Microsoft.Data.OData" version="5.6.2" targetFramework="net452" />
5-
<package id="Microsoft.Data.Services.Client" version="5.6.2" targetFramework="net452" />
6-
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="1.8.0.0" targetFramework="net452" />
7-
<package id="Newtonsoft.Json" version="5.0.8" targetFramework="net452" />
8-
<package id="System.Spatial" version="5.6.2" targetFramework="net452" />
9-
<package id="WindowsAzure.Storage" version="4.3.0" targetFramework="net452" />
3+
<package id="Microsoft.Azure.ConfigurationManager" version="4.0.0" targetFramework="net472" />
4+
<package id="Microsoft.Azure.KeyVault.Core" version="3.0.3" targetFramework="net472" />
5+
<package id="Microsoft.Azure.Storage.Common" version="10.0.2" targetFramework="net472" />
6+
<package id="Microsoft.Azure.Storage.Queue" version="10.0.2" targetFramework="net472" />
7+
<package id="Microsoft.Data.Edm" version="5.8.4" targetFramework="net472" />
8+
<package id="Microsoft.Data.OData" version="5.8.4" targetFramework="net472" />
9+
<package id="Microsoft.Data.Services.Client" version="5.8.4" targetFramework="net472" />
10+
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net472" />
11+
<package id="System.Spatial" version="5.8.4" targetFramework="net472" />
1012
</packages>

0 commit comments

Comments
 (0)