Skip to content

Commit b0332b8

Browse files
Abdelrahman ElogeelAbdelrahman Elogeel
Abdelrahman Elogeel
authored and
Abdelrahman Elogeel
committed
Merge pull request Azure#2 from WindowsAzure/master
Update to latest
2 parents 87e75e9 + 16cafbb commit b0332b8

File tree

553 files changed

+118405
-26773
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

553 files changed

+118405
-26773
lines changed

README.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<h1>Windows Azure SDK for .NET (1.7.0.0)</h1>
1+
<h1>Windows Azure SDK for Windows 8 and .NET 4 (2.0.2)</h1>
22
<p>This SDK allows you to build Windows Azure applications that take advantage of
33
Azure scalable cloud computing resources: table and blob storage, messaging through
44
Service Bus, distributed caching through cache.</p>
@@ -41,35 +41,46 @@ within your project you can also have them installed by the .NET package manager
4141
<ul>
4242
<li>Account: To use this SDK to call Windows Azure services, you need to first
4343
create an account.</li>
44-
<li>Hosting: To host your Java code in Windows Azure, you additionally need
44+
<li>Hosting: To host your .Net code in Windows Azure, you additionally need
4545
to download the full Windows Azure SDK for .NET - which includes packaging,
4646
emulation, and deployment tools.</li>
47-
<li>.NET Framework 3.5 or higher</li>
47+
<li>Windows 8 or .NET Framework 4.0</li>
4848
</ul>
4949

50+
<h2>Dependencies</h2>
51+
<p>
52+
The 2.0.2 version depends on three libraries (collectively referred to as ODataLib), which are resolved through the ODataLib (version 5.0.2) packages available through NuGet and not the WCF Data Services installer which currently contains 5.0.0 versions.
53+
The ODataLib libraries can be downloaded directly or referenced by your code project through NuGet.
54+
The specific ODataLib packages are:<br/>
55+
http://nuget.org/packages/Microsoft.Data.OData/5.0.2<br/>
56+
http://nuget.org/packages/Microsoft.Data.Edm/5.0.2<br/>
57+
http://nuget.org/packages/System.Spatial/5.0.2<br/>
58+
</p>
59+
5060
<h2>Code Samples</h2>
5161
<p>Note:</p>
5262
<ul>
53-
<li>All code samples are available under the <code>/samples</code> folder.</li>
5463
<li>How-Tos focused around accomplishing specific tasks are available on the
5564
<a href="http://www.windowsazure.com/en-us/develop/net/">Windows Azure .NET
5665
Developer Center</a>.</li>
5766
</ul>
5867

59-
<p>First, include the classes you need (in this case we'll include the StorageClient
68+
<p>First, include the classes you need (in this case we'll include the Storage and Table
6069
and further demonstrate creating a table):<br/>
61-
<pre>using Microsoft.WindowsAzure;
62-
using Microsoft.WindowsAzure.StorageClient;</pre></p>
70+
<pre>using Microsoft.WindowsAzure.Storage;
71+
using Microsoft.WindowsAzure.Storage.Table;</pre></p>
6372

6473
<p>To perform an operation on any Windows Azure resource you will first instantiate
6574
a <strong>client</strong> which allows performing actions on it. The resource is known as an
6675
<strong>entity</strong>. To do so for Table you also have to authenticate your request:<br/>
6776
<pre>var storageAccount =
68-
CloudStorageAccount.FromConfigurationSetting("StorageConnectionString");
77+
CloudStorageAccount.DevelopmentStorageAccount;
6978
var tableClient = storageAccount.CreateCloudTableClient();</pre></p>
7079

7180
<p>Now, to create a table entity using the client:<br/>
72-
<pre>tableClient.CreateTable("People");</pre></p>
81+
<pre>CloudTable peopleTable = tableClient.GetTableReference("people");
82+
peopleTable.Create();
83+
</pre></p>
7384

7485
<h1>Need Help?</h1>
7586
<p>Be sure to check out the Windows Azure <a href="http://go.microsoft.com/fwlink/?LinkId=234489">

microsoft-azure-api/Configuration/Microsoft.WindowsAzure.Configuration/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@
3131
// The following GUID is for the ID of the typelib if this project is exposed to COM
3232
[assembly: Guid("3a4d8eda-db18-4c6f-9f84-4576bb255f30")]
3333

34-
[assembly: AssemblyVersion("1.7.0.0")]
35-
[assembly: AssemblyFileVersion("1.7.0.0")]
34+
[assembly: AssemblyVersion("1.8.0.0")]
35+
[assembly: AssemblyFileVersion("1.8.0.0")]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.cs eol=crlf
2+
*.csproj eol=crlf
3+
*.sln eol=crlf

microsoft-azure-api/Services/Storage/AssemblyInfo.cs

Lines changed: 0 additions & 98 deletions
This file was deleted.

microsoft-azure-api/Services/Storage/GlobalSuppressions.cs

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
// -----------------------------------------------------------------------------------------
2+
// <copyright file="AccessCondition.cs" company="Microsoft">
3+
// Copyright 2012 Microsoft Corporation
4+
//
5+
// Licensed under the Apache License, Version 2.0 (the "License");
6+
// you may not use this file except in compliance with the License.
7+
// You may obtain a copy of the License at
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
// </copyright>
16+
// -----------------------------------------------------------------------------------------
17+
18+
namespace Microsoft.WindowsAzure.Storage
19+
{
20+
using System;
21+
22+
/// <summary>
23+
/// Represents a set of access conditions to be used for operations against the storage services.
24+
/// </summary>
25+
public sealed class AccessCondition
26+
{
27+
/// <summary>
28+
/// Time for IfModifiedSince.
29+
/// </summary>
30+
private DateTimeOffset? ifModifiedSinceDateTime;
31+
32+
/// <summary>
33+
/// Time for IfUnmodifiedSince.
34+
/// </summary>
35+
private DateTimeOffset? ifNotModifiedSinceDateTime;
36+
37+
/// <summary>
38+
/// Gets or sets an "etag" that must match the ETag of a resource.
39+
/// </summary>
40+
/// <value>A quoted ETag string. If <c>null</c>, no condition exists.</value>
41+
public string IfMatchETag
42+
{
43+
get;
44+
set;
45+
}
46+
47+
/// <summary>
48+
/// Gets or sets an ETag that must not match the ETag of a resource.
49+
/// </summary>
50+
/// <value>A quoted ETag string, or <c>"*"</c> to match any ETag. If null, no condition exists.</value>
51+
public string IfNoneMatchETag
52+
{
53+
get;
54+
set;
55+
}
56+
57+
/// <summary>
58+
/// Gets or sets a time that must be before the last modification of a resource.
59+
/// </summary>
60+
/// <value>A <c>DateTimeOffset</c> in UTC, or null if no condition exists.</value>
61+
public DateTimeOffset? IfModifiedSinceTime
62+
{
63+
get
64+
{
65+
return this.ifModifiedSinceDateTime;
66+
}
67+
68+
set
69+
{
70+
this.ifModifiedSinceDateTime = value.HasValue ? value.Value.ToUniversalTime() : value;
71+
}
72+
}
73+
74+
/// <summary>
75+
/// Gets or sets a time that must not be before the last modification of a resource.
76+
/// </summary>
77+
/// <value>A <c>DateTimeOffset</c> in UTC, or null if no condition exists.</value>
78+
public DateTimeOffset? IfNotModifiedSinceTime
79+
{
80+
get
81+
{
82+
return this.ifNotModifiedSinceDateTime;
83+
}
84+
85+
set
86+
{
87+
this.ifNotModifiedSinceDateTime = value.HasValue ? value.Value.ToUniversalTime() : value;
88+
}
89+
}
90+
91+
/// <summary>
92+
/// Gets or sets a lease ID that must match the lease on a resource.
93+
/// </summary>
94+
/// <value>A lease ID, or null if no condition exists.</value>
95+
public string LeaseId
96+
{
97+
get;
98+
set;
99+
}
100+
101+
/// <summary>
102+
/// Constructs an empty access condition.
103+
/// </summary>
104+
/// <returns>An empty access condition.</returns>
105+
public static AccessCondition GenerateEmptyCondition()
106+
{
107+
return new AccessCondition();
108+
}
109+
110+
/// <summary>
111+
/// Constructs an access condition such that an operation will be performed only if the resource's ETag value
112+
/// matches the specified ETag value.
113+
/// </summary>
114+
/// <param name="etag">The ETag value that must be matched.</param>
115+
/// <returns>An <c>AccessCondition</c> object that represents the If-Match condition.</returns>
116+
public static AccessCondition GenerateIfMatchCondition(string etag)
117+
{
118+
return new AccessCondition { IfMatchETag = etag };
119+
}
120+
121+
/// <summary>
122+
/// Constructs an access condition such that an operation will be performed only if the resource has been
123+
/// modified since the specified time.
124+
/// </summary>
125+
/// <param name="modifiedTime">The time that must be before the last modified time of the resource.</param>
126+
/// <returns>An <c>AccessCondition</c> object that represents the If-Modified-Since condition.</returns>
127+
public static AccessCondition GenerateIfModifiedSinceCondition(DateTimeOffset modifiedTime)
128+
{
129+
return new AccessCondition { IfModifiedSinceTime = modifiedTime };
130+
}
131+
132+
/// <summary>
133+
/// Constructs an access condition such that an operation will be performed only if the resource's ETag value
134+
/// does not match the specified ETag value.
135+
/// </summary>
136+
/// <param name="etag">The ETag value that must be matched, or <c>"*"</c>.</param>
137+
/// <returns>An <c>AccessCondition</c> object that represents the If-None-Match condition.</returns>
138+
/// <remarks>
139+
/// If <c>"*"</c> is specified as the parameter then this condition requires that the resource does not exist.
140+
/// </remarks>
141+
public static AccessCondition GenerateIfNoneMatchCondition(string etag)
142+
{
143+
return new AccessCondition { IfNoneMatchETag = etag };
144+
}
145+
146+
/// <summary>
147+
/// Constructs an access condition such that an operation will be performed only if the resource has not been
148+
/// modified since the specified time.
149+
/// </summary>
150+
/// <param name="modifiedTime">The time that must not be before the last modified time of the resource.</param>
151+
/// <returns>An <c>AccessCondition</c> object that represents the If-Unmodified-Since condition.</returns>
152+
public static AccessCondition GenerateIfNotModifiedSinceCondition(DateTimeOffset modifiedTime)
153+
{
154+
return new AccessCondition { IfNotModifiedSinceTime = modifiedTime };
155+
}
156+
157+
/// <summary>
158+
/// Constructs an access condition such that an operation will be performed only if the lease ID on the
159+
/// resource matches the specified lease ID.
160+
/// </summary>
161+
/// <param name="leaseId">The lease ID that must match the lease ID of the resource.</param>
162+
/// <returns>An <c>AccessCondition</c> object that represents the lease condition.</returns>
163+
public static AccessCondition GenerateLeaseCondition(string leaseId)
164+
{
165+
return new AccessCondition { LeaseId = leaseId };
166+
}
167+
}
168+
}

0 commit comments

Comments
 (0)