Skip to content

Commit

Permalink
Merge pull request #123 from WindowsAzure/dev
Browse files Browse the repository at this point in the history
Merging dev branch with Storage Library 2.0.1
  • Loading branch information
jeffwilcox committed Nov 7, 2012
2 parents 598f5a0 + d5a891f commit 5c1700d
Show file tree
Hide file tree
Showing 11 changed files with 253 additions and 21 deletions.
Expand Up @@ -82,5 +82,20 @@ public partial interface ICloudBlob : IListBlobItem
/// </summary> /// </summary>
/// <value>The type of the blob.</value> /// <value>The type of the blob.</value>
BlobType BlobType { get; } 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);
} }
} }
Expand Up @@ -467,7 +467,7 @@ internal static CloudStorageAccount GetDevelopmentStorageAccount(Uri proxyUri)
/// <returns>If true, the parse was successful. Otherwise, false.</returns> /// <returns>If true, the parse was successful. Otherwise, false.</returns>
internal static bool TryParse(string s, out CloudStorageAccount accountInformation, Action<string> error) 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 // malformed settings string
if (settings == null) if (settings == null)
Expand All @@ -477,15 +477,22 @@ internal static bool TryParse(string s, out CloudStorageAccount accountInformati
return false; return false;
} }


string proxyUri = null;

// devstore case // devstore case
if (MatchesSpecification( if (MatchesSpecification(
settings, settings,
AllRequired(UseDevelopmentStorageSetting), AllRequired(UseDevelopmentStorageSetting),
Optional(DevelopmentStorageProxyUriSetting))) Optional(DevelopmentStorageProxyUriSetting)))
{ {
var proxyUri = settings[DevelopmentStorageProxyUriSettingString]; if (settings.TryGetValue(DevelopmentStorageProxyUriSettingString, out proxyUri))

{
accountInformation = GetDevelopmentStorageAccount(proxyUri == null ? null : new Uri(proxyUri)); accountInformation = GetDevelopmentStorageAccount(new Uri(proxyUri));
}
else
{
accountInformation = GetDevelopmentStorageAccount(null);
}


return true; return true;
} }
Expand Down
Expand Up @@ -605,7 +605,7 @@ internal class HeaderConstants
/// <summary> /// <summary>
/// Specifies the value to use for UserAgent header. /// Specifies the value to use for UserAgent header.
/// </summary> /// </summary>
public const string UserAgentProductVersion = "2.0.0"; public const string UserAgentProductVersion = "2.0.1";


/// <summary> /// <summary>
/// Master Windows Azure Storage header prefix. /// Master Windows Azure Storage header prefix.
Expand Down
@@ -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";
}
}
Expand Up @@ -42,18 +42,18 @@
<AssemblyOriginatorKeyFile>MSSharedLibKey.snk</AssemblyOriginatorKeyFile> <AssemblyOriginatorKeyFile>MSSharedLibKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <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> <SpecificVersion>False</SpecificVersion>
<HintPath>..\DotNetCommon\Dependencies\Microsoft.Data.Edm.dll</HintPath> <HintPath>..\DotNetCommon\Dependencies\Microsoft.Data.Edm.dll</HintPath>
</Reference> </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> <SpecificVersion>False</SpecificVersion>
<HintPath>..\DotNetCommon\Dependencies\Microsoft.Data.OData.dll</HintPath> <HintPath>..\DotNetCommon\Dependencies\Microsoft.Data.OData.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Data.Services.Client" /> <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> <SpecificVersion>False</SpecificVersion>
<HintPath>..\DotNetCommon\Dependencies\System.Spatial.dll</HintPath> <HintPath>..\DotNetCommon\Dependencies\System.Spatial.dll</HintPath>
</Reference> </Reference>
Expand Down
Expand Up @@ -35,8 +35,8 @@
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.0.0")] [assembly: AssemblyVersion("2.0.1.0")]
[assembly: AssemblyFileVersion("2.0.0.0")] [assembly: AssemblyFileVersion("2.0.1.0")]


#if SIGNED #if SIGNED
[assembly: InternalsVisibleTo( [assembly: InternalsVisibleTo(
Expand Down
Expand Up @@ -24,7 +24,7 @@
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.0.0")] [assembly: AssemblyVersion("2.0.1.0")]
[assembly: AssemblyFileVersion("2.0.0.0")] [assembly: AssemblyFileVersion("2.0.1.0")]
[assembly: ComVisible(false)] [assembly: ComVisible(false)]
[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Storage.Table")] [assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Storage.Table")]
6 changes: 3 additions & 3 deletions microsoft-azure-api/Services/Storage/Lib/RT/RT.csproj
Expand Up @@ -278,16 +278,16 @@
</Compile> </Compile>
</ItemGroup> </ItemGroup>
<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> <SpecificVersion>False</SpecificVersion>
<HintPath>Dependencies\Microsoft.Data.Edm.WindowsStore.dll</HintPath> <HintPath>Dependencies\Microsoft.Data.Edm.WindowsStore.dll</HintPath>
</Reference> </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> <SpecificVersion>False</SpecificVersion>
<HintPath>Dependencies\Microsoft.Data.OData.WindowsStore.dll</HintPath> <HintPath>Dependencies\Microsoft.Data.OData.WindowsStore.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <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> <SpecificVersion>False</SpecificVersion>
<HintPath>Dependencies\System.Spatial.WindowsStore.dll</HintPath> <HintPath>Dependencies\System.Spatial.WindowsStore.dll</HintPath>
</Reference> </Reference>
Expand Down
Expand Up @@ -24,6 +24,6 @@
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.0.0")] [assembly: AssemblyVersion("2.0.1.0")]
[assembly: AssemblyFileVersion("2.0.0.0")] [assembly: AssemblyFileVersion("2.0.1.0")]
[assembly: ComVisible(false)] [assembly: ComVisible(false)]
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.0.0")] [assembly: AssemblyVersion("2.0.1.0")]
[assembly: AssemblyFileVersion("2.0.0.0")] [assembly: AssemblyFileVersion("2.0.1.0")]
Expand Up @@ -24,5 +24,5 @@
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.0.0")] [assembly: AssemblyVersion("2.0.1.0")]
[assembly: AssemblyFileVersion("2.0.0.0")] [assembly: AssemblyFileVersion("2.0.1.0")]

0 comments on commit 5c1700d

Please sign in to comment.