Permalink
Browse files

Merge pull request #2 from WindowsAzure/master

Update to latest
  • Loading branch information...
2 parents 87e75e9 + 16cafbb commit b0332b83f0138952c6e43c2518df1381878dec34 Abdelrahman Elogeel committed Dec 21, 2012
Showing 554 changed files with 118,426 additions and 26,794 deletions.
View
@@ -1,4 +1,4 @@
-<h1>Windows Azure SDK for .NET (1.7.0.0)</h1>
+<h1>Windows Azure SDK for Windows 8 and .NET 4 (2.0.2)</h1>
<p>This SDK allows you to build Windows Azure applications that take advantage of
Azure scalable cloud computing resources: table and blob storage, messaging through
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
<ul>
<li>Account: To use this SDK to call Windows Azure services, you need to first
create an account.</li>
- <li>Hosting: To host your Java code in Windows Azure, you additionally need
+ <li>Hosting: To host your .Net code in Windows Azure, you additionally need
to download the full Windows Azure SDK for .NET - which includes packaging,
emulation, and deployment tools.</li>
- <li>.NET Framework 3.5 or higher</li>
+ <li>Windows 8 or .NET Framework 4.0</li>
</ul>
+<h2>Dependencies</h2>
+<p>
+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.
+The ODataLib libraries can be downloaded directly or referenced by your code project through NuGet.
+The specific ODataLib packages are:<br/>
+http://nuget.org/packages/Microsoft.Data.OData/5.0.2<br/>
+http://nuget.org/packages/Microsoft.Data.Edm/5.0.2<br/>
+http://nuget.org/packages/System.Spatial/5.0.2<br/>
+</p>
+
<h2>Code Samples</h2>
<p>Note:</p>
<ul>
- <li>All code samples are available under the <code>/samples</code> folder.</li>
<li>How-Tos focused around accomplishing specific tasks are available on the
<a href="http://www.windowsazure.com/en-us/develop/net/">Windows Azure .NET
Developer Center</a>.</li>
</ul>
-<p>First, include the classes you need (in this case we'll include the StorageClient
+<p>First, include the classes you need (in this case we'll include the Storage and Table
and further demonstrate creating a table):<br/>
-<pre>using Microsoft.WindowsAzure;
-using Microsoft.WindowsAzure.StorageClient;</pre></p>
+<pre>using Microsoft.WindowsAzure.Storage;
+using Microsoft.WindowsAzure.Storage.Table;</pre></p>
<p>To perform an operation on any Windows Azure resource you will first instantiate
a <strong>client</strong> which allows performing actions on it. The resource is known as an
<strong>entity</strong>. To do so for Table you also have to authenticate your request:<br/>
<pre>var storageAccount =
- CloudStorageAccount.FromConfigurationSetting("StorageConnectionString");
+ CloudStorageAccount.DevelopmentStorageAccount;
var tableClient = storageAccount.CreateCloudTableClient();</pre></p>
<p>Now, to create a table entity using the client:<br/>
-<pre>tableClient.CreateTable("People");</pre></p>
+<pre>CloudTable peopleTable = tableClient.GetTableReference("people");
+peopleTable.Create();
+</pre></p>
<h1>Need Help?</h1>
<p>Be sure to check out the Windows Azure <a href="http://go.microsoft.com/fwlink/?LinkId=234489">
@@ -31,5 +31,5 @@
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("3a4d8eda-db18-4c6f-9f84-4576bb255f30")]
-[assembly: AssemblyVersion("1.7.0.0")]
-[assembly: AssemblyFileVersion("1.7.0.0")]
+[assembly: AssemblyVersion("1.8.0.0")]
+[assembly: AssemblyFileVersion("1.8.0.0")]
@@ -0,0 +1,3 @@
+*.cs eol=crlf
+*.csproj eol=crlf
+*.sln eol=crlf
@@ -1,98 +0,0 @@
-//-----------------------------------------------------------------------
-// <copyright file="AssemblyInfo.cs" company="Microsoft">
-// Copyright 2012 Microsoft Corporation
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// </copyright>
-// <summary>
-// Contains assembly information.
-// </summary>
-//-----------------------------------------------------------------------
-
-using System;
-using System.Resources;
-using System.Runtime.CompilerServices;
-using System.Security;
-using System.Reflection;
-
-#if UNSIGNED
-[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.StorageClient.Internal")]
-[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.StorageClient.ConvenienceTests")]
-[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.StorageClient.Protocol.Tests")]
-[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Diagnostics")]
-[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Diagnostics.Internal")]
-[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.CloudDrive")]
-[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.InternalAccessor")]
-#else
-[assembly: InternalsVisibleTo(
- "Microsoft.WindowsAzure.StorageClient.Internal, PublicKey=" +
- "0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67" +
- "871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0b" +
- "d333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307" +
- "e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c3" +
- "08055da9")]
-[assembly: InternalsVisibleTo(
- "StorageClientConvenienceTests, PublicKey=" +
- "0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67" +
- "871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0b" +
- "d333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307" +
- "e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c3" +
- "08055da9")]
-[assembly: InternalsVisibleTo(
- "StorageClientProtocolTests, PublicKey=" +
- "0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67" +
- "871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0b" +
- "d333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307" +
- "e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c3" +
- "08055da9")]
-[assembly: InternalsVisibleTo(
- "StorageClientProtocolBillingTests, PublicKey=" +
- "0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67" +
- "871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0b" +
- "d333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307" +
- "e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c3" +
- "08055da9")]
-[assembly: InternalsVisibleTo(
- "Microsoft.WindowsAzure.Diagnostics, PublicKey=" +
- "0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67" +
- "871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0b" +
- "d333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307" +
- "e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c3" +
- "08055da9")]
-[assembly: InternalsVisibleTo(
- "Microsoft.WindowsAzure.Diagnostics.Internal, PublicKey=" +
- "0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67" +
- "871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0b" +
- "d333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307" +
- "e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c3" +
- "08055da9")]
-[assembly: InternalsVisibleTo(
- "Microsoft.WindowsAzure.CloudDrive, PublicKey=" +
- "0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67" +
- "871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0b" +
- "d333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307" +
- "e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c3" +
- "08055da9")]
-[assembly: InternalsVisibleTo(
- "Microsoft.WindowsAzure.InternalAccessor, PublicKey=" +
- "0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67" +
- "871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0b" +
- "d333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307" +
- "e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c3" +
- "08055da9")]
-
-#endif
-[assembly: AssemblyVersion("1.7.0.0")]
-[assembly: CLSCompliant(true)]
-[assembly: AllowPartiallyTrustedCallers]
-[assembly: SecurityTransparent]
-[assembly: NeutralResourcesLanguageAttribute("en-US")]
@@ -1,32 +0,0 @@
-//-----------------------------------------------------------------------
-// <copyright file="GlobalSuppressions.cs" company="Microsoft">
-// Copyright 2012 Microsoft Corporation
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// </copyright>
-// <summary>
-// Defines suppressions for the project
-// </summary>
-//-----------------------------------------------------------------------
-//
-// This file is used by Code Analysis to maintain SuppressMessage
-// attributes that are applied to this project.
-// Project-level suppressions either have no target or are given
-// a specific target and scoped to a namespace, type, member, etc.
-//
-// To add a suppression to this file, right-click the message in the
-// Error List, point to "Suppress Message(s)", and click
-// "In Project Suppression File".
-// You do not need to add suppressions to this file manually.
-
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1701:ResourceStringCompoundWordsShouldBeCasedCorrectly", MessageId = "ETag", Scope = "resource", Target = "Microsoft.WindowsAzure.StorageClient.SR.resources")]
-[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "string", Scope = "member", Target = "Microsoft.WindowsAzure.StorageClient.Protocol.CanonicalizationStrategy.#AppendStringToCanonicalizedString(System.Text.StringBuilder,System.String)")]
@@ -0,0 +1,168 @@
+// -----------------------------------------------------------------------------------------
+// <copyright file="AccessCondition.cs" company="Microsoft">
+// Copyright 2012 Microsoft Corporation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// </copyright>
+// -----------------------------------------------------------------------------------------
+
+namespace Microsoft.WindowsAzure.Storage
+{
+ using System;
+
+ /// <summary>
+ /// Represents a set of access conditions to be used for operations against the storage services.
+ /// </summary>
+ public sealed class AccessCondition
+ {
+ /// <summary>
+ /// Time for IfModifiedSince.
+ /// </summary>
+ private DateTimeOffset? ifModifiedSinceDateTime;
+
+ /// <summary>
+ /// Time for IfUnmodifiedSince.
+ /// </summary>
+ private DateTimeOffset? ifNotModifiedSinceDateTime;
+
+ /// <summary>
+ /// Gets or sets an "etag" that must match the ETag of a resource.
+ /// </summary>
+ /// <value>A quoted ETag string. If <c>null</c>, no condition exists.</value>
+ public string IfMatchETag
+ {
+ get;
+ set;
+ }
+
+ /// <summary>
+ /// Gets or sets an ETag that must not match the ETag of a resource.
+ /// </summary>
+ /// <value>A quoted ETag string, or <c>"*"</c> to match any ETag. If null, no condition exists.</value>
+ public string IfNoneMatchETag
+ {
+ get;
+ set;
+ }
+
+ /// <summary>
+ /// Gets or sets a time that must be before the last modification of a resource.
+ /// </summary>
+ /// <value>A <c>DateTimeOffset</c> in UTC, or null if no condition exists.</value>
+ public DateTimeOffset? IfModifiedSinceTime
+ {
+ get
+ {
+ return this.ifModifiedSinceDateTime;
+ }
+
+ set
+ {
+ this.ifModifiedSinceDateTime = value.HasValue ? value.Value.ToUniversalTime() : value;
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a time that must not be before the last modification of a resource.
+ /// </summary>
+ /// <value>A <c>DateTimeOffset</c> in UTC, or null if no condition exists.</value>
+ public DateTimeOffset? IfNotModifiedSinceTime
+ {
+ get
+ {
+ return this.ifNotModifiedSinceDateTime;
+ }
+
+ set
+ {
+ this.ifNotModifiedSinceDateTime = value.HasValue ? value.Value.ToUniversalTime() : value;
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets a lease ID that must match the lease on a resource.
+ /// </summary>
+ /// <value>A lease ID, or null if no condition exists.</value>
+ public string LeaseId
+ {
+ get;
+ set;
+ }
+
+ /// <summary>
+ /// Constructs an empty access condition.
+ /// </summary>
+ /// <returns>An empty access condition.</returns>
+ public static AccessCondition GenerateEmptyCondition()
+ {
+ return new AccessCondition();
+ }
+
+ /// <summary>
+ /// Constructs an access condition such that an operation will be performed only if the resource's ETag value
+ /// matches the specified ETag value.
+ /// </summary>
+ /// <param name="etag">The ETag value that must be matched.</param>
+ /// <returns>An <c>AccessCondition</c> object that represents the If-Match condition.</returns>
+ public static AccessCondition GenerateIfMatchCondition(string etag)
+ {
+ return new AccessCondition { IfMatchETag = etag };
+ }
+
+ /// <summary>
+ /// Constructs an access condition such that an operation will be performed only if the resource has been
+ /// modified since the specified time.
+ /// </summary>
+ /// <param name="modifiedTime">The time that must be before the last modified time of the resource.</param>
+ /// <returns>An <c>AccessCondition</c> object that represents the If-Modified-Since condition.</returns>
+ public static AccessCondition GenerateIfModifiedSinceCondition(DateTimeOffset modifiedTime)
+ {
+ return new AccessCondition { IfModifiedSinceTime = modifiedTime };
+ }
+
+ /// <summary>
+ /// Constructs an access condition such that an operation will be performed only if the resource's ETag value
+ /// does not match the specified ETag value.
+ /// </summary>
+ /// <param name="etag">The ETag value that must be matched, or <c>"*"</c>.</param>
+ /// <returns>An <c>AccessCondition</c> object that represents the If-None-Match condition.</returns>
+ /// <remarks>
+ /// If <c>"*"</c> is specified as the parameter then this condition requires that the resource does not exist.
+ /// </remarks>
+ public static AccessCondition GenerateIfNoneMatchCondition(string etag)
+ {
+ return new AccessCondition { IfNoneMatchETag = etag };
+ }
+
+ /// <summary>
+ /// Constructs an access condition such that an operation will be performed only if the resource has not been
+ /// modified since the specified time.
+ /// </summary>
+ /// <param name="modifiedTime">The time that must not be before the last modified time of the resource.</param>
+ /// <returns>An <c>AccessCondition</c> object that represents the If-Unmodified-Since condition.</returns>
+ public static AccessCondition GenerateIfNotModifiedSinceCondition(DateTimeOffset modifiedTime)
+ {
+ return new AccessCondition { IfNotModifiedSinceTime = modifiedTime };
+ }
+
+ /// <summary>
+ /// Constructs an access condition such that an operation will be performed only if the lease ID on the
+ /// resource matches the specified lease ID.
+ /// </summary>
+ /// <param name="leaseId">The lease ID that must match the lease ID of the resource.</param>
+ /// <returns>An <c>AccessCondition</c> object that represents the lease condition.</returns>
+ public static AccessCondition GenerateLeaseCondition(string leaseId)
+ {
+ return new AccessCondition { LeaseId = leaseId };
+ }
+ }
+}
Oops, something went wrong.

0 comments on commit b0332b8

Please sign in to comment.