Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #330 from erezvani1529/master
Browse files Browse the repository at this point in the history
7.2.0 Release
  • Loading branch information
erezvani1529 authored Aug 11, 2016
2 parents cd1aa62 + d0b9458 commit 68c3ee5
Show file tree
Hide file tree
Showing 174 changed files with 661 additions and 685 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The Azure Storage development team uses Visual Studio so instructions will be ta

### Open Solution
For non-CoreCLR solutions, you can open the project from VS using File->Open->Project/Solution and navigating to the Microsoft.WindowsAzure.Storage.sln solution file in the repo base folder.
For the CoreCLR solution, you can open the project using the AspNet_k.sln solution in the repo base folder.
For the CoreCLR solution, you can open the project using the NETCORE.sln solution in the repo base folder.

## Tests

Expand Down
6 changes: 3 additions & 3 deletions Lib/AspNet/Microsoft.WindowsAzure.Storage/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
// 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("7.1.3.0")]
[assembly: AssemblyFileVersion("7.1.3.0")]
[assembly: AssemblyInformationalVersion("7.1.3.0-preview")]
[assembly: AssemblyVersion("7.2.0.0")]
[assembly: AssemblyFileVersion("7.2.0.0")]
[assembly: AssemblyInformationalVersion("7.2.0.0")]

[assembly: InternalsVisibleTo(
"Microsoft.WindowsAzure.Storage.Test, PublicKey=" +
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// -----------------------------------------------------------------------------------------
// <copyright file="TypeInfoExtension.cs" company="Microsoft">
// Copyright 2013 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.Extensions
{
using System;
using System.Collections.Generic;
using System.Reflection;

internal static class TypeInfoExtension
{
public static IEnumerable<PropertyInfo> GetAllProperties(this TypeInfo typeInfo)
{
while (typeInfo != null)
{
foreach (var t in typeInfo.DeclaredProperties)
{
yield return t;
}

typeInfo = typeInfo.BaseType?.GetTypeInfo();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata minClientVersion="2.8.3">
<id>WindowsAzure.Storage</id>
<version>7.1.3-preview</version>
<version>7.2.0</version>
<title>Windows Azure Storage</title>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
Expand All @@ -18,14 +18,12 @@
<summary>A client library for working with Microsoft Azure storage services including blobs, files, tables, and queues.</summary>
<tags>Microsoft, Azure, Storage, Table, Blob, File, Queue, Scalable, windowsazureofficial</tags>
<dependencies>
<group targetFramework=".netstandard1.6">
<group targetFramework=".netstandard1.3">
<dependency id="NETStandard.Library" version="1.6.0" />
<dependency id="System.Dynamic.Runtime" version="4.0.11" />
<dependency id="System.Security.Cryptography.Algorithms" version="4.2.0" />
<dependency id="Microsoft.Data.OData" version="5.6.4" />
<dependency id="Microsoft.Data.Services.Client" version="5.6.4" />
<dependency id="System.Spatial" version="5.6.4" />
<dependency id="Newtonsoft.Json" version="6.0.8" />
<dependency id="Newtonsoft.Json" version="9.0.1" />
</group>
<group targetFramework="net40-client">
<dependency id="Microsoft.Data.OData" version="5.6.4" />
Expand All @@ -46,10 +44,6 @@
<dependency id="Newtonsoft.Json" version="6.0.8" />
<dependency id="Microsoft.Azure.KeyVault.Core" version="1.0.0" />
</group>
<group targetFramework="portable-net45+netcore45+wpa81+MonoAndroid1+MonoTouch1">
<dependency id="Microsoft.Data.OData" version="5.6.4" />
<dependency id="Newtonsoft.Json" version="6.0.8" />
</group>
</dependencies>
<frameworkAssemblies>
<frameworkAssembly assemblyName="System.Data" targetFramework="ASP.Net5.0" />
Expand Down
12 changes: 5 additions & 7 deletions Lib/AspNet/Microsoft.WindowsAzure.Storage/project.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
{
"version": "7.1.3.0",
"version": "7.2.0.0",
"authors": [ "Microsoft Corporation" ],
"description": "Azure Storage SDK for CoreCLR Preview",
"dependencies": {
"Microsoft.Data.OData": "5.6.4",
"Microsoft.Data.Services.Client": "5.6.4",
"System.Spatial": "5.6.4",
"Newtonsoft.Json": "6.0.8"
"Newtonsoft.Json": "9.0.1"
},

"frameworks": {
"netstandard1.6": {
"netstandard1.3": {
"dependencies": {
"NETStandard.Library": "1.6.0",
"System.Dynamic.Runtime": "4.0.11",
"System.Security.Cryptography.Algorithms": "4.2.0"
"NETStandard.Library": "1.6.0"
},
"imports": [
"dnxcore50",
Expand All @@ -25,7 +23,7 @@
},

"buildOptions": {
"define": [ "ASPNET_K" ],
"define": [ "NETCORE" ],
"allowUnsafe": false,
"warningsAsErrors": true,
"delaySign": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace Microsoft.WindowsAzure.Storage.Auth.Protocol
public interface IAuthenticationHandler
{
/// <summary>
/// Signs the specified HTTP request so it can be authenticated by the Windows Azure storage services.
/// Signs the specified HTTP request so it can be authenticated by the Microsoft Azure storage services.
/// </summary>
/// <param name="request">The HTTP request to sign.</param>
/// <param name="operationContext">An <see cref="OperationContext"/> object that represents the context for the current operation.</param>
Expand Down
1 change: 1 addition & 0 deletions Lib/ClassLibraryCommon/Blob/BlobEncryptionPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ internal ICryptoTransform CreateAndSetEncryptionContext(IDictionary<string, stri
encryptionData.WrappedContentKey = new WrappedKey(this.Key.Kid, wrappedKey.Item1, wrappedKey.Item2);
encryptionData.EncryptionMode = this.EncryptionMode.ToString();
encryptionData.KeyWrappingMetadata = new Dictionary<string, string>();
encryptionData.KeyWrappingMetadata[Constants.EncryptionConstants.AgentMetadataKey] = Constants.EncryptionConstants.AgentMetadataValue;
encryptionData.ContentEncryptionIV = aesProvider.IV;
metadata[Constants.EncryptionConstants.BlobEncryptionData] = JsonConvert.SerializeObject(encryptionData);
return aesProvider.CreateEncryptor();
Expand Down
19 changes: 8 additions & 11 deletions Lib/ClassLibraryCommon/Blob/CloudAppendBlob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ namespace Microsoft.WindowsAzure.Storage.Blob
using System.Threading;
using System.Threading.Tasks;

/// <summary>
/// Represents an append blob, a type of blob where blocks of data are always committed to the end of the blob.
/// </summary>
public partial class CloudAppendBlob : CloudBlob, ICloudBlob
{
#if SYNC
Expand All @@ -60,13 +57,13 @@ public virtual CloudBlobStream OpenWrite(bool createNew, AccessCondition accessC
this.attributes.AssertNoSnapshot();
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, this.BlobType, this.ServiceClient, false);

#if !(WINDOWS_RT || ASPNET_K || PORTABLE)
#if !(WINDOWS_RT || NETCORE )
ICryptoTransform transform = null;
#endif

if (createNew)
{
#if !(WINDOWS_RT || ASPNET_K || PORTABLE)
#if !(WINDOWS_RT || NETCORE )
if (options != null && options.EncryptionPolicy != null)
{
transform = options.EncryptionPolicy.CreateAndSetEncryptionContext(this.Metadata, false /* noPadding */);
Expand All @@ -81,7 +78,7 @@ public virtual CloudBlobStream OpenWrite(bool createNew, AccessCondition accessC
throw new ArgumentException(SR.MD5NotPossible);
}

#if !(WINDOWS_RT || ASPNET_K || PORTABLE)
#if !(WINDOWS_RT || NETCORE )
if (modifiedOptions.EncryptionPolicy != null)
{
throw new ArgumentException(SR.EncryptionNotSupportedForExistingBlobs);
Expand All @@ -97,7 +94,7 @@ public virtual CloudBlobStream OpenWrite(bool createNew, AccessCondition accessC
accessCondition = new AccessCondition() { LeaseId = accessCondition.LeaseId, IfAppendPositionEqual = accessCondition.IfAppendPositionEqual, IfMaxSizeLessThanOrEqual = accessCondition.IfMaxSizeLessThanOrEqual };
}

#if !(WINDOWS_RT || ASPNET_K || PORTABLE)
#if !(WINDOWS_RT || NETCORE )
if (modifiedOptions.EncryptionPolicy != null)
{
return new BlobEncryptedWriteStream(this, accessCondition, modifiedOptions, operationContext, transform);
Expand Down Expand Up @@ -154,13 +151,13 @@ public virtual ICancellableAsyncResult BeginOpenWrite(bool createNew, AccessCond
StorageAsyncResult<CloudBlobStream> storageAsyncResult = new StorageAsyncResult<CloudBlobStream>(callback, state);
ICancellableAsyncResult result;

#if !(WINDOWS_RT || ASPNET_K || PORTABLE)
#if !(WINDOWS_RT || NETCORE )
ICryptoTransform transform = null;
#endif

if (createNew)
{
#if !(WINDOWS_RT || ASPNET_K || PORTABLE)
#if !(WINDOWS_RT || NETCORE )
if (options != null && options.EncryptionPolicy != null)
{
transform = options.EncryptionPolicy.CreateAndSetEncryptionContext(this.Metadata, false /* noPadding */);
Expand All @@ -183,7 +180,7 @@ public virtual ICancellableAsyncResult BeginOpenWrite(bool createNew, AccessCond
accessCondition = new AccessCondition() { LeaseId = accessCondition.LeaseId, IfAppendPositionEqual = accessCondition.IfAppendPositionEqual, IfMaxSizeLessThanOrEqual = accessCondition.IfMaxSizeLessThanOrEqual };
}

#if !(WINDOWS_RT || ASPNET_K || PORTABLE)
#if !(WINDOWS_RT || NETCORE )
if (modifiedOptions.EncryptionPolicy != null)
{
storageAsyncResult.Result = new BlobEncryptedWriteStream(this, accessCondition, modifiedOptions, operationContext, transform);
Expand All @@ -210,7 +207,7 @@ public virtual ICancellableAsyncResult BeginOpenWrite(bool createNew, AccessCond
throw new ArgumentException(SR.MD5NotPossible);
}

#if !(WINDOWS_RT || ASPNET_K || PORTABLE)
#if !(WINDOWS_RT || NETCORE )
if (modifiedOptions.EncryptionPolicy != null)
{
throw new ArgumentException(SR.EncryptionNotSupportedForExistingBlobs);
Expand Down
3 changes: 0 additions & 3 deletions Lib/ClassLibraryCommon/Blob/CloudBlob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ namespace Microsoft.WindowsAzure.Storage.Blob
using System.Threading;
using System.Threading.Tasks;

/// <summary>
/// Represents a blob.
/// </summary>
public partial class CloudBlob : IListBlobItem
{
#if SYNC
Expand Down
5 changes: 0 additions & 5 deletions Lib/ClassLibraryCommon/Blob/CloudBlobClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ namespace Microsoft.WindowsAzure.Storage.Blob
using System.Threading;
using System.Threading.Tasks;

/// <summary>
/// Provides a client-side logical representation of the Windows Azure Blob service. This client is used to configure and execute requests against the Blob service.
/// </summary>
/// <remarks>The service client encapsulates the endpoint or endpoints for the Blob service. If the service client will be used for authenticated access,
/// it also encapsulates the credentials for accessing the storage account.</remarks>
public partial class CloudBlobClient
{
private IAuthenticationHandler authenticationHandler;
Expand Down
2 changes: 1 addition & 1 deletion Lib/ClassLibraryCommon/Blob/CloudBlobContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace Microsoft.WindowsAzure.Storage.Blob
using System.Threading.Tasks;

/// <summary>
/// Represents a container in the Windows Azure Blob service.
/// Represents a container in the Microsoft Azure Blob service.
/// </summary>
public partial class CloudBlobContainer
{
Expand Down
2 changes: 1 addition & 1 deletion Lib/ClassLibraryCommon/Blob/CloudBlockBlob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public virtual CloudBlobStream OpenWrite(AccessCondition accessCondition = null,
}
}

#if !(WINDOWS_RT || ASPNET_K || PORTABLE)
#if !(WINDOWS_RT || NETCORE )
modifiedOptions.AssertPolicyIfRequired();

if (modifiedOptions.EncryptionPolicy != null)
Expand Down
14 changes: 7 additions & 7 deletions Lib/ClassLibraryCommon/Blob/CloudPageBlob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace Microsoft.WindowsAzure.Storage.Blob
using System.Threading.Tasks;

/// <summary>
/// Represents a Windows Azure page blob.
/// Represents a Microsoft Azure page blob.
/// </summary>
public partial class CloudPageBlob : CloudBlob, ICloudBlob
{
Expand All @@ -59,7 +59,7 @@ public virtual CloudBlobStream OpenWrite(long? size, AccessCondition accessCondi
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, this.BlobType, this.ServiceClient, false);
bool createNew = size.HasValue;

#if !(WINDOWS_RT || ASPNET_K || PORTABLE)
#if !(WINDOWS_RT || NETCORE )
ICryptoTransform transform = null;

modifiedOptions.AssertPolicyIfRequired();
Expand All @@ -81,7 +81,7 @@ public virtual CloudBlobStream OpenWrite(long? size, AccessCondition accessCondi
throw new ArgumentException(SR.MD5NotPossible);
}

#if !(WINDOWS_RT || ASPNET_K || PORTABLE)
#if !(WINDOWS_RT || NETCORE )
if (modifiedOptions.EncryptionPolicy != null)
{
throw new ArgumentException(SR.EncryptionNotSupportedForExistingBlobs);
Expand All @@ -96,7 +96,7 @@ public virtual CloudBlobStream OpenWrite(long? size, AccessCondition accessCondi
accessCondition = AccessCondition.GenerateLeaseCondition(accessCondition.LeaseId);
}

#if !(WINDOWS_RT || ASPNET_K || PORTABLE)
#if !(WINDOWS_RT || NETCORE )
if (modifiedOptions.EncryptionPolicy != null)
{
return new BlobEncryptedWriteStream(this, size.Value, createNew, accessCondition, modifiedOptions, operationContext, transform);
Expand Down Expand Up @@ -160,7 +160,7 @@ public virtual ICancellableAsyncResult BeginOpenWrite(long? size, AccessConditio

if (createNew)
{
#if !(WINDOWS_RT || ASPNET_K || PORTABLE)
#if !(WINDOWS_RT || NETCORE )
ICryptoTransform transform = null;
if (options != null && options.EncryptionPolicy != null)
{
Expand Down Expand Up @@ -189,7 +189,7 @@ public virtual ICancellableAsyncResult BeginOpenWrite(long? size, AccessConditio
accessCondition = AccessCondition.GenerateLeaseCondition(accessCondition.LeaseId);
}

#if !(WINDOWS_RT || ASPNET_K || PORTABLE)
#if !(WINDOWS_RT || NETCORE )
if (modifiedOptions.EncryptionPolicy != null)
{
storageAsyncResult.Result = new BlobEncryptedWriteStream(this, this.Properties.Length, createNew, accessCondition, modifiedOptions, operationContext, transform);
Expand All @@ -216,7 +216,7 @@ public virtual ICancellableAsyncResult BeginOpenWrite(long? size, AccessConditio
throw new ArgumentException(SR.MD5NotPossible);
}

#if !(WINDOWS_RT || ASPNET_K || PORTABLE)
#if !(WINDOWS_RT || NETCORE )
if (modifiedOptions.EncryptionPolicy != null)
{
throw new ArgumentException(SR.EncryptionNotSupportedForExistingBlobs);
Expand Down
8 changes: 4 additions & 4 deletions Lib/ClassLibraryCommon/Blob/ICloudBlob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace Microsoft.WindowsAzure.Storage.Blob
using System.Threading.Tasks;

/// <summary>
/// An interface required for Windows Azure blob types. The <see cref="CloudBlockBlob"/> and <see cref="CloudPageBlob"/> classes implement the <see cref="ICloudBlob"/> interface.
/// An interface required for Microsoft Azure blob types. The <see cref="CloudBlockBlob"/> and <see cref="CloudPageBlob"/> classes implement the <see cref="ICloudBlob"/> interface.
/// </summary>
public partial interface ICloudBlob : IListBlobItem
{
Expand Down Expand Up @@ -159,7 +159,7 @@ public partial interface ICloudBlob : IListBlobItem

#if SYNC
/// <summary>
/// Uploads a stream to the Windows Azure Blob Service.
/// Uploads a stream to the Microsoft Azure Blob Service.
/// </summary>
/// <param name="source">The stream providing the blob content. Use a seek-able stream for optimal performance.</param>
/// <param name="accessCondition">An <see cref="AccessCondition"/> object that represents the condition that must be met in order for the request to proceed.</param>
Expand All @@ -168,7 +168,7 @@ public partial interface ICloudBlob : IListBlobItem
void UploadFromStream(Stream source, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null);

/// <summary>
/// Uploads a stream to the Windows Azure Blob Service.
/// Uploads a stream to the Microsoft Azure Blob Service.
/// </summary>
/// <param name="source">A <see cref="System.IO.Stream"/> object providing the blob content.</param>
/// <param name="length">The number of bytes to write from the source stream at its current position.</param>
Expand Down Expand Up @@ -308,7 +308,7 @@ public partial interface ICloudBlob : IListBlobItem

#if SYNC
/// <summary>
/// Uploads a file to the Windows Azure Blob Service.
/// Uploads a file to the Microsoft Azure Blob Service.
/// </summary>
/// <param name="path">A string containing the file path providing the blob content.</param>
/// <param name="accessCondition">An <see cref="AccessCondition"/> object that represents the condition that must be met in order for the request to proceed.</param>
Expand Down
6 changes: 3 additions & 3 deletions Lib/ClassLibraryCommon/Core/Auth/ICanonicalizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace Microsoft.WindowsAzure.Storage.Core.Auth
/// <summary>
/// <para>Represents a canonicalizer that converts HTTP request data into a standard form appropriate for signing.</para>
/// <para>For detailed information on how to authenticate a request,
/// see <see href="http://msdn.microsoft.com/en-us/library/windowsazure/dd179428.aspx">Authentication for the Windows Azure Storage Services</see>.</para>
/// see <see href="http://msdn.microsoft.com/en-us/library/windowsazure/dd179428.aspx">Authentication for the Microsoft Azure Storage Services</see>.</para>
/// </summary>
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Canonicalizer", Justification = "Reviewed: Canonicalizer can be used as an identifier name.")]
public interface ICanonicalizer
Expand All @@ -32,7 +32,7 @@ public interface ICanonicalizer
/// Gets the authorization scheme used for canonicalization.
/// </summary>
/// <value>The authorization scheme used for canonicalization.</value>
/// <seealso href="http://msdn.microsoft.com/en-us/library/windowsazure/dd179428.aspx">Authentication for the Windows Azure Storage Services</seealso>
/// <seealso href="http://msdn.microsoft.com/en-us/library/windowsazure/dd179428.aspx">Authentication for the Microsoft Azure Storage Services</seealso>
string AuthorizationScheme { get; }

/// <summary>
Expand All @@ -41,7 +41,7 @@ public interface ICanonicalizer
/// <param name="request">The HTTP request that needs to be signed.</param>
/// <param name="accountName">The name of the storage account that the HTTP request will access.</param>
/// <returns>The canonicalized string containing the HTTP request data in a standard form appropriate for signing.</returns>
/// <seealso href="http://msdn.microsoft.com/en-us/library/windowsazure/dd179428.aspx">Authentication for the Windows Azure Storage Services</seealso>
/// <seealso href="http://msdn.microsoft.com/en-us/library/windowsazure/dd179428.aspx">Authentication for the Microsoft Azure Storage Services</seealso>
string CanonicalizeHttpRequest(HttpWebRequest request, string accountName);
}
}
Loading

0 comments on commit 68c3ee5

Please sign in to comment.