Permalink
Browse files

Merge pull request #123 from WindowsAzure/dev

Merging dev branch with Storage Library 2.0.1
  • Loading branch information...
2 parents 598f5a0 + d5a891f commit 5c1700df469b282ce088443f08920cf6ee4e2e96 @jeffwilcox jeffwilcox committed Nov 7, 2012
View
15 microsoft-azure-api/Services/Storage/Lib/Common/Blob/ICloudBlobBase.cs
@@ -82,5 +82,20 @@ public partial interface ICloudBlob : IListBlobItem
/// </summary>
/// <value>The type of the blob.</value>
BlobType BlobType { get; }
+
+ /// <summary>
+ /// Returns a shared access signature for the blob.
+ /// </summary>
+ /// <param name="policy">The access policy for the shared access signature.</param>
+ /// <returns>A shared access signature.</returns>
+ string GetSharedAccessSignature(SharedAccessBlobPolicy policy);
+
+ /// <summary>
+ /// Returns a shared access signature for the blob.
+ /// </summary>
+ /// <param name="policy">The access policy for the shared access signature.</param>
+ /// <param name="groupPolicyIdentifier">A container-level access policy.</param>
+ /// <returns>A shared access signature.</returns>
+ string GetSharedAccessSignature(SharedAccessBlobPolicy policy, string groupPolicyIdentifier);
}
}
View
15 microsoft-azure-api/Services/Storage/Lib/Common/CloudStorageAccount.cs
@@ -467,7 +467,7 @@ internal static CloudStorageAccount GetDevelopmentStorageAccount(Uri proxyUri)
/// <returns>If true, the parse was successful. Otherwise, false.</returns>
internal static bool TryParse(string s, out CloudStorageAccount accountInformation, Action<string> error)
{
- var settings = ParseStringIntoSettings(s, error);
+ IDictionary<string, string> settings = ParseStringIntoSettings(s, error);
// malformed settings string
if (settings == null)
@@ -477,15 +477,22 @@ internal static bool TryParse(string s, out CloudStorageAccount accountInformati
return false;
}
+ string proxyUri = null;
+
// devstore case
if (MatchesSpecification(
settings,
AllRequired(UseDevelopmentStorageSetting),
Optional(DevelopmentStorageProxyUriSetting)))
{
- var proxyUri = settings[DevelopmentStorageProxyUriSettingString];
-
- accountInformation = GetDevelopmentStorageAccount(proxyUri == null ? null : new Uri(proxyUri));
+ if (settings.TryGetValue(DevelopmentStorageProxyUriSettingString, out proxyUri))
+ {
+ accountInformation = GetDevelopmentStorageAccount(new Uri(proxyUri));
+ }
+ else
+ {
+ accountInformation = GetDevelopmentStorageAccount(null);
+ }
return true;
}
View
2 microsoft-azure-api/Services/Storage/Lib/Common/Shared/Protocol/Constants.cs
@@ -605,7 +605,7 @@ internal class HeaderConstants
/// <summary>
/// Specifies the value to use for UserAgent header.
/// </summary>
- public const string UserAgentProductVersion = "2.0.0";
+ public const string UserAgentProductVersion = "2.0.1";
/// <summary>
/// Master Windows Azure Storage header prefix.
View
210 microsoft-azure-api/Services/Storage/Lib/Common/Shared/Protocol/StorageErrorCodeStrings.cs
@@ -0,0 +1,210 @@
+// -----------------------------------------------------------------------------------------
+// <copyright file="StorageErrorCodeStrings.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.Shared.Protocol
+{
+ /// <summary>
+ /// Provides error code strings that are common to all storage services.
+ /// </summary>
+#if RTMD
+ internal
+#else
+ public
+#endif
+ static class StorageErrorCodeStrings
+ {
+ /// <summary>
+ /// The specified HTTP verb is not supported.
+ /// </summary>
+ public const string UnsupportedHttpVerb = "UnsupportedHttpVerb";
+
+ /// <summary>
+ /// The Content-Length header is required for this request.
+ /// </summary>
+ public const string MissingContentLengthHeader = "MissingContentLengthHeader";
+
+ /// <summary>
+ /// A required header was missing.
+ /// </summary>
+ public const string MissingRequiredHeader = "MissingRequiredHeader";
+
+ /// <summary>
+ /// A required XML node was missing.
+ /// </summary>
+ public const string MissingRequiredXmlNode = "MissingRequiredXmlNode";
+
+ /// <summary>
+ /// One or more header values are not supported.
+ /// </summary>
+ public const string UnsupportedHeader = "UnsupportedHeader";
+
+ /// <summary>
+ /// One or more XML nodes are not supported.
+ /// </summary>
+ public const string UnsupportedXmlNode = "UnsupportedXmlNode";
+
+ /// <summary>
+ /// One or more header values are invalid.
+ /// </summary>
+ public const string InvalidHeaderValue = "InvalidHeaderValue";
+
+ /// <summary>
+ /// One or more XML node values are invalid.
+ /// </summary>
+ public const string InvalidXmlNodeValue = "InvalidXmlNodeValue";
+
+ /// <summary>
+ /// A required query parameter is missing.
+ /// </summary>
+ public const string MissingRequiredQueryParameter = "MissingRequiredQueryParameter";
+
+ /// <summary>
+ /// One or more query parameters is not supported.
+ /// </summary>
+ public const string UnsupportedQueryParameter = "UnsupportedQueryParameter";
+
+ /// <summary>
+ /// One or more query parameters are invalid.
+ /// </summary>
+ public const string InvalidQueryParameterValue = "InvalidQueryParameterValue";
+
+ /// <summary>
+ /// One or more query parameters are out of range.
+ /// </summary>
+ public const string OutOfRangeQueryParameterValue = "OutOfRangeQueryParameterValue";
+
+ /// <summary>
+ /// The URI is invalid.
+ /// </summary>
+ public const string InvalidUri = "InvalidUri";
+
+ /// <summary>
+ /// The HTTP verb is invalid.
+ /// </summary>
+ public const string InvalidHttpVerb = "InvalidHttpVerb";
+
+ /// <summary>
+ /// The metadata key is empty.
+ /// </summary>
+ public const string EmptyMetadataKey = "EmptyMetadataKey";
+
+ /// <summary>
+ /// The request body is too large.
+ /// </summary>
+ public const string RequestBodyTooLarge = "RequestBodyTooLarge";
+
+ /// <summary>
+ /// The specified XML document is invalid.
+ /// </summary>
+ public const string InvalidXmlDocument = "InvalidXmlDocument";
+
+ /// <summary>
+ /// An internal error occurred.
+ /// </summary>
+ public const string InternalError = "InternalError";
+
+ /// <summary>
+ /// Authentication failed.
+ /// </summary>
+ public const string AuthenticationFailed = "AuthenticationFailed";
+
+ /// <summary>
+ /// The specified MD5 hash does not match the server value.
+ /// </summary>
+ [System.Diagnostics.CodeAnalysis.SuppressMessage(
+ "Microsoft.Naming",
+ "CA1709:IdentifiersShouldBeCasedCorrectly",
+ MessageId = "Md",
+ Justification = "The casing matches the storage constant the identifier represents.")]
+ public const string Md5Mismatch = "Md5Mismatch";
+
+ /// <summary>
+ /// The specified MD5 hash is invalid.
+ /// </summary>
+ [System.Diagnostics.CodeAnalysis.SuppressMessage(
+ "Microsoft.Naming",
+ "CA1709:IdentifiersShouldBeCasedCorrectly",
+ MessageId = "Md",
+ Justification = "The casing matches the storage constant the identifier represents.")]
+ public const string InvalidMd5 = "InvalidMd5";
+
+ /// <summary>
+ /// The input is out of range.
+ /// </summary>
+ public const string OutOfRangeInput = "OutOfRangeInput";
+
+ /// <summary>
+ /// The input is invalid.
+ /// </summary>
+ public const string InvalidInput = "InvalidInput";
+
+ /// <summary>
+ /// The operation timed out.
+ /// </summary>
+ public const string OperationTimedOut = "OperationTimedOut";
+
+ /// <summary>
+ /// The specified resource was not found.
+ /// </summary>
+ public const string ResourceNotFound = "ResourceNotFound";
+
+ /// <summary>
+ /// The specified metadata is invalid.
+ /// </summary>
+ public const string InvalidMetadata = "InvalidMetadata";
+
+ /// <summary>
+ /// The specified metadata is too large.
+ /// </summary>
+ public const string MetadataTooLarge = "MetadataTooLarge";
+
+ /// <summary>
+ /// The specified condition was not met.
+ /// </summary>
+ public const string ConditionNotMet = "ConditionNotMet";
+
+ /// <summary>
+ /// The specified range is invalid.
+ /// </summary>
+ public const string InvalidRange = "InvalidRange";
+
+ /// <summary>
+ /// The specified container was not found.
+ /// </summary>
+ public const string ContainerNotFound = "ContainerNotFound";
+
+ /// <summary>
+ /// The specified container already exists.
+ /// </summary>
+ public const string ContainerAlreadyExists = "ContainerAlreadyExists";
+
+ /// <summary>
+ /// The specified container is disabled.
+ /// </summary>
+ public const string ContainerDisabled = "ContainerDisabled";
+
+ /// <summary>
+ /// The specified container is being deleted.
+ /// </summary>
+ public const string ContainerBeingDeleted = "ContainerBeingDeleted";
+
+ /// <summary>
+ /// The server is busy.
+ /// </summary>
+ public const string ServerBusy = "ServerBusy";
+ }
+}
View
6 microsoft-azure-api/Services/Storage/Lib/DotNet40/DotNet40.csproj
@@ -42,18 +42,18 @@
<AssemblyOriginatorKeyFile>MSSharedLibKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Microsoft.Data.Edm, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Reference Include="Microsoft.Data.Edm, Version=5.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\DotNetCommon\Dependencies\Microsoft.Data.Edm.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.Data.OData, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Reference Include="Microsoft.Data.OData, Version=5.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\DotNetCommon\Dependencies\Microsoft.Data.OData.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data.Services.Client" />
- <Reference Include="System.Spatial, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <Reference Include="System.Spatial, Version=5.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\DotNetCommon\Dependencies\System.Spatial.dll</HintPath>
</Reference>
View
4 microsoft-azure-api/Services/Storage/Lib/DotNet40/Properties/AssemblyInfo.cs
@@ -35,8 +35,8 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.0.0.0")]
-[assembly: AssemblyFileVersion("2.0.0.0")]
+[assembly: AssemblyVersion("2.0.1.0")]
+[assembly: AssemblyFileVersion("2.0.1.0")]
#if SIGNED
[assembly: InternalsVisibleTo(
View
4 microsoft-azure-api/Services/Storage/Lib/RT/Properties/AssemblyInfo.cs
@@ -24,7 +24,7 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.0.0.0")]
-[assembly: AssemblyFileVersion("2.0.0.0")]
+[assembly: AssemblyVersion("2.0.1.0")]
+[assembly: AssemblyFileVersion("2.0.1.0")]
[assembly: ComVisible(false)]
[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Storage.Table")]
View
6 microsoft-azure-api/Services/Storage/Lib/RT/RT.csproj
@@ -278,16 +278,16 @@
</Compile>
</ItemGroup>
<ItemGroup>
- <Reference Include="Microsoft.Data.Edm.WindowsStore, Version=5.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="Microsoft.Data.Edm.WindowsStore, Version=5.0.2.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>Dependencies\Microsoft.Data.Edm.WindowsStore.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.Data.OData.WindowsStore, Version=5.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="Microsoft.Data.OData.WindowsStore, Version=5.0.2.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>Dependencies\Microsoft.Data.OData.WindowsStore.dll</HintPath>
</Reference>
<Reference Include="System" />
- <Reference Include="System.Spatial.WindowsStore, Version=5.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="System.Spatial.WindowsStore, Version=5.0.2.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>Dependencies\System.Spatial.WindowsStore.dll</HintPath>
</Reference>
View
4 microsoft-azure-api/Services/Storage/Lib/RTTable/Properties/AssemblyInfo.cs
@@ -24,6 +24,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.0.0.0")]
-[assembly: AssemblyFileVersion("2.0.0.0")]
+[assembly: AssemblyVersion("2.0.1.0")]
+[assembly: AssemblyFileVersion("2.0.1.0")]
[assembly: ComVisible(false)]
View
4 microsoft-azure-api/Services/Storage/Test/Unit/DotNet40/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.0.0.0")]
-[assembly: AssemblyFileVersion("2.0.0.0")]
+[assembly: AssemblyVersion("2.0.1.0")]
+[assembly: AssemblyFileVersion("2.0.1.0")]
View
4 microsoft-azure-api/Services/Storage/Test/Unit/RT/Properties/AssemblyInfo.cs
@@ -24,5 +24,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.0.0.0")]
-[assembly: AssemblyFileVersion("2.0.0.0")]
+[assembly: AssemblyVersion("2.0.1.0")]
+[assembly: AssemblyFileVersion("2.0.1.0")]

0 comments on commit 5c1700d

Please sign in to comment.