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 #569 from erezvani1529/master
Browse files Browse the repository at this point in the history

* Revert "Revert "Revert "[8.2][Sharesnapshot]Disable DelSnpshOptns"""

This reverts commit 998ec79.

* [8.5]ShareSnapshot Facade changes

* Fix sharesnapshot nullref

* [8.5] Assembly version update

* Byte type property support to TableEntity.Flatten/ConvertBack API s (#537)

* TableEntityAdapter class and unit tests

* Update on code comments, typos.

* Additional unit tests for struct type POCO objects.

* New struct type test entity with value and reference type properties. Does not implement ITableEntity interface or inherit from TableEntity.

* Updated changelog, additional remarks for api usage.

* Additional remarks for api usage

* byte type property support to tableentity

* unit test updates

* For blob tiers support last modified tier time and getting inferred header when listing

* AccountSAS Test fixes-Serverside update:No IP returned in ErrorMessage

* [8.6]Update Assembly Versions

* [8.6]Update Assembly Versions

* [8.6] Facade Changes + ReadMe Update
  • Loading branch information
erezvani1529 authored Nov 14, 2017
2 parents 72c4cb3 + 6875fe4 commit bdeb107
Show file tree
Hide file tree
Showing 44 changed files with 217 additions and 415 deletions.
13 changes: 3 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ AppPackages/
Packages/

# Test Config
Test/Common/TestConfigurations.xml
*TestConfigurations.xml

# Fiddler dlls
Test/FaultInjection/Dependencies/DotNet2/FiddlerCore.dll
Expand All @@ -139,15 +139,8 @@ objfre/
*.playlist

# NetCore Dependency
Lib/AspNet/Microsoft.WindowsAzure.Storage/project.lock.json
Lib/AspNet/Microsoft.WindowsAzure.Storage.Facade/project.lock.json
Test/AspNet/Microsoft.WindowsAzure.Storage.Test/TestConfigurations.xml
Test/AspNet/Facade/Microsoft.WindowsAzure.Storage.Facade.NetCore.Test/TestConfigurations.xml
Test/AspNet/Microsoft.WindowsAzure.Storage.Test/project.lock.json
Test/AspNet/XUnitForMsTest/project.lock.json
Test/AspNet/Facade/Microsoft.WindowsAzure.Storage.Facade.NetCore.Test/project.lock.json
Test/AspNet/Facade/Microsoft.WindowsAzure.Storage.Facade.PhoneSilverlight81.Test/project.lock.json
Test/AspNet/Facade/Microsoft.WindowsAzure.Storage.Facade.Portable/project.lock.json
*project.lock.json


# VS14 Misc.
UpgradeLog.htm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ public bool? BlobTierInferred
get; internal set;
}

public DateTimeOffset? BlobTierLastModifiedTime
{
get; internal set;
}

public BlobProperties()
{
throw new System.NotImplementedException();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ public static class EncryptionConstants
public const string TableEncryptionKeyDetails = "_ClientEncryptionMetadata1";
public const string TableEncryptionPropertyDetails = "_ClientEncryptionMetadata2";
public const string AgentMetadataKey = "EncryptionLibrary";
public const string AgentMetadataValue = ".NET 8.5.0";
public const string AgentMetadataValue = ".NET 8.6.0";
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public static class EncryptionConstants
public const string TableEncryptionKeyDetails = "_ClientEncryptionMetadata1";
public const string TableEncryptionPropertyDetails = "_ClientEncryptionMetadata2";
public const string AgentMetadataKey = "EncryptionLibrary";
public const string AgentMetadataValue = ".NET 8.5.0";
public const string AgentMetadataValue = ".NET 8.6.0";
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ namespace Microsoft.WindowsAzure.Storage.Shared.Protocol

public static class HeaderConstants
{
public static readonly string UserAgent = "Azure-Storage/8.5.0 ";
public static readonly string UserAgent = "Azure-Storage/8.6.0 ";
public const string UserAgentProductName = "Azure-Storage";
public const string UserAgentProductVersion = "8.5.0";
public const string UserAgentProductVersion = "8.6.0";
public const string PrefixForStorageHeader = "x-ms-";
public const string TrueHeader = "true";
public const string FalseHeader = "false";
Expand Down Expand Up @@ -41,6 +41,7 @@ public static class HeaderConstants
public const string AccessTierHeader = "x-ms-access-tier";
public const string ArchiveStatusHeader = "x-ms-archive-status";
public const string AccessTierInferredHeader = "x-ms-access-tier-inferred";
public const string AccessTierChangeTimeHeader = "x-ms-access-tier-change-time";
public const string BlobCacheControlHeader = "x-ms-blob-cache-control";
public const string BlobContentDispositionRequestHeader = "x-ms-blob-content-disposition";
public const string BlobContentEncodingHeader = "x-ms-blob-content-encoding";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("8.5.0.0")]
[assembly: AssemblyFileVersion("8.5.0.0")]
[assembly: AssemblyVersion("8.6.0.0")]
[assembly: AssemblyFileVersion("8.6.0.0")]

[assembly: InternalsVisibleTo(
"Microsoft.WindowsAzure.Storage.Facade.Portable, PublicKey=" +
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "Microsoft.WindowsAzure.Storage",
"version": "8.5.0.0",
"version": "8.6.0.0",

"authors": [ "Microsoft Corporation" ],
"description": "Azure Storage SDK for NetCore",
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 @@ -34,9 +34,9 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("8.5.0.0")]
[assembly: AssemblyFileVersion("8.5.0.0")]
[assembly: AssemblyInformationalVersion("8.5.0.0")]
[assembly: AssemblyVersion("8.6.0.0")]
[assembly: AssemblyFileVersion("8.6.0.0")]
[assembly: AssemblyInformationalVersion("8.6.0.0")]


[assembly: InternalsVisibleTo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>WindowsAzure.Storage</id>
<version>8.5.0</version>
<version>8.6.0</version>
<title>Windows Azure Storage</title>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
Expand Down
2 changes: 1 addition & 1 deletion Lib/AspNet/Microsoft.WindowsAzure.Storage/project.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "8.5.0.0",
"version": "8.6.0.0",

"authors": [ "Microsoft Corporation" ],
"description": "Azure Storage SDK for NetCore",
Expand Down
1 change: 1 addition & 0 deletions Lib/ClassLibraryCommon/Blob/CloudBlockBlob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2737,6 +2737,7 @@ private RESTCommand<NullType> SetStandardBlobTierImpl(StandardBlobTier standardB
CloudBlob.UpdateETagLMTLengthAndSequenceNumber(this.attributes, resp, false);

this.attributes.Properties.RehydrationStatus = null;
this.attributes.Properties.BlobTierInferred = false;
if (resp.StatusCode.Equals(HttpStatusCode.OK))
{
this.attributes.Properties.StandardBlobTier = standardBlobTier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public static BlobProperties GetProperties(HttpWebResponse response)
properties.StandardBlobTier = standardBlobTier;
properties.PremiumPageBlobTier = premiumPageBlobTier;

if (properties.PremiumPageBlobTier.HasValue && !properties.BlobTierInferred.HasValue)
if ((properties.PremiumPageBlobTier.HasValue || properties.StandardBlobTier.HasValue) && !properties.BlobTierInferred.HasValue)
{
properties.BlobTierInferred = false;
}
Expand All @@ -157,6 +157,13 @@ public static BlobProperties GetProperties(HttpWebResponse response)
string rehydrationStatusString = response.Headers[Constants.HeaderConstants.ArchiveStatusHeader];
properties.RehydrationStatus = BlobHttpResponseParsers.GetRehydrationStatus(rehydrationStatusString);

// Get the time the tier of the blob was last modified
string accessTierChangeTimeString = response.Headers[Constants.HeaderConstants.AccessTierChangeTimeHeader];
if (!string.IsNullOrEmpty(accessTierChangeTimeString))
{
properties.BlobTierLastModifiedTime = DateTimeOffset.Parse(accessTierChangeTimeString, CultureInfo.InvariantCulture);
}

return properties;
}

Expand Down
11 changes: 9 additions & 2 deletions Lib/Common/Blob/BlobProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public BlobProperties(BlobProperties other)
this.PremiumPageBlobTier = other.PremiumPageBlobTier;
this.StandardBlobTier = other.StandardBlobTier;
this.RehydrationStatus = other.RehydrationStatus;
this.BlobTierLastModifiedTime = other.BlobTierLastModifiedTime;
}

/// <summary>
Expand Down Expand Up @@ -195,9 +196,15 @@ public BlobProperties(BlobProperties other)
public PremiumPageBlobTier? PremiumPageBlobTier { get; internal set; }

/// <summary>
/// Gets a value indicating if the tier of the premium page blob has been inferred.
/// Gets a value indicating if the tier of the blob has been inferred.
/// </summary>
/// <value>A bool representing if the premium blob tier has been inferred.</value>
/// <value>A bool representing if the blob tier has been inferred.</value>
public bool? BlobTierInferred { get; internal set; }

/// <summary>
/// Gets the time for when the tier of the blob was last-modified, expressed as a UTC value.
/// </summary>
/// <value>A <see cref="DateTimeOffset"/> containing the time for when the tier of the blob was last-modified, in UTC format.</value>
public DateTimeOffset? BlobTierLastModifiedTime { get; internal set; }
}
}
14 changes: 13 additions & 1 deletion Lib/Common/Blob/Protocol/ListBlobsResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ private IListBlobEntry ParseBlobEntry(Uri baseUri)
string copyDestinationSnapshotTime = null;

string blobTierString = null;
bool? blobTierInferred = null;
string rehydrationStatusString = null;
DateTimeOffset? blobTierLastModifiedTime = null;

this.reader.ReadStartElement();
while (this.reader.IsStartElement())
Expand Down Expand Up @@ -355,6 +357,15 @@ private IListBlobEntry ParseBlobEntry(Uri baseUri)
rehydrationStatusString = reader.ReadElementContentAsString();
break;

case Constants.AccessTierInferred:
blobTierInferred = reader.ReadElementContentAsBoolean();
break;

case Constants.AccessTierChangeTimeElement:
string t = reader.ReadElementContentAsString();
blobTierLastModifiedTime = DateTimeOffset.Parse(t, CultureInfo.InvariantCulture);
break;

default:
reader.Skip();
break;
Expand Down Expand Up @@ -408,10 +419,11 @@ private IListBlobEntry ParseBlobEntry(Uri baseUri)
BlobHttpResponseParsers.GetBlobTier(blob.Properties.BlobType, blobTierString, out standardBlobTier, out premiumPageBlobTier);
blob.Properties.StandardBlobTier = standardBlobTier;
blob.Properties.PremiumPageBlobTier = premiumPageBlobTier;
blob.Properties.BlobTierInferred = false;
}

blob.Properties.RehydrationStatus = BlobHttpResponseParsers.GetRehydrationStatus(rehydrationStatusString);
blob.Properties.BlobTierLastModifiedTime = blobTierLastModifiedTime;
blob.Properties.BlobTierInferred = blobTierInferred;

return new ListBlobEntry(name, blob);
}
Expand Down
17 changes: 16 additions & 1 deletion Lib/Common/Shared/Protocol/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,16 @@ static class Constants
/// </summary>
public const string AccessTierElement = "AccessTier";

/// <summary>
/// Constant for the access tier being inferred.
/// </summary>
public const string AccessTierInferred = "AccessTierInferred";

/// <summary>
/// Constant for the access tier change time.
/// </summary>
public const string AccessTierChangeTimeElement = "AccessTierChangeTime";

/// <summary>
/// Constant for the archive status.
/// </summary>
Expand Down Expand Up @@ -844,7 +854,7 @@ static HeaderConstants()
/// <summary>
/// Specifies the value to use for UserAgent header.
/// </summary>
public const string UserAgentProductVersion = "8.5.0";
public const string UserAgentProductVersion = "8.6.0";

/// <summary>
/// Master Microsoft Azure Storage header prefix.
Expand Down Expand Up @@ -1016,6 +1026,11 @@ static HeaderConstants()
/// </summary>
public const string AccessTierInferredHeader = PrefixForStorageHeader + "access-tier-inferred";

/// <summary>
/// Header for the last time the tier was modified.
/// </summary>
public const string AccessTierChangeTimeHeader = PrefixForStorageHeader + "access-tier-change-time";

/// <summary>
/// Header that specifies blob caching control.
/// </summary>
Expand Down
10 changes: 10 additions & 0 deletions Lib/Common/Table/EntityPropertyConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,11 @@ private static EntityProperty CreateEntityPropertyWithType(object value, Type ty
{
return new EntityProperty((byte[])value);
}
else if (type == typeof(byte))
{
byte[] temp = new byte[] { (byte)value};
return new EntityProperty(temp);
}
else if (type == typeof(bool))
{
return new EntityProperty((bool)value);
Expand Down Expand Up @@ -445,6 +450,11 @@ private static object ChangeType(object propertyValue, Type propertyType)
return unchecked((ulong)(long)propertyValue);
}

if (type == typeof(byte))
{
return ((byte[])propertyValue)[0];
}

return Convert.ChangeType(propertyValue, type, CultureInfo.InvariantCulture);
}

Expand Down
4 changes: 2 additions & 2 deletions Lib/WindowsDesktop/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("8.5.0.0")]
[assembly: AssemblyFileVersion("8.5.0.0")]
[assembly: AssemblyVersion("8.6.0.0")]
[assembly: AssemblyFileVersion("8.6.0.0")]

#if SIGN
[assembly: InternalsVisibleTo(
Expand Down
2 changes: 1 addition & 1 deletion Lib/WindowsDesktop/WindowsAzure.Storage.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata minClientVersion="2.12">
<id>WindowsAzure.Storage</id>
<version>8.5.0</version>
<version>8.6.0</version>
<title>Windows Azure Storage</title>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
Expand Down
4 changes: 2 additions & 2 deletions Lib/WindowsPhone/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:

[assembly: AssemblyVersion("8.5.0.0")]
[assembly: AssemblyFileVersion("8.5.0.0")]
[assembly: AssemblyVersion("8.6.0.0")]
[assembly: AssemblyFileVersion("8.6.0.0")]

[assembly: NeutralResourcesLanguageAttribute("en-US")]

Expand Down
4 changes: 2 additions & 2 deletions Lib/WindowsPhoneRT/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("8.5.0.0")]
[assembly: AssemblyFileVersion("8.5.0.0")]
[assembly: AssemblyVersion("8.6.0.0")]
[assembly: AssemblyFileVersion("8.6.0.0")]

[assembly: NeutralResourcesLanguageAttribute("en-US")]
[assembly: ComVisible(false)]
Expand Down
1 change: 1 addition & 0 deletions Lib/WindowsRuntime/Blob/CloudBlockBlob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1193,6 +1193,7 @@ private RESTCommand<NullType> SetStandardBlobTierImpl(StandardBlobTier standardB
CloudBlob.UpdateETagLMTLengthAndSequenceNumber(this.attributes, resp, false);

this.attributes.Properties.RehydrationStatus = null;
this.attributes.Properties.BlobTierInferred = false;
if (resp.StatusCode.Equals(HttpStatusCode.OK))
{
this.attributes.Properties.StandardBlobTier = standardBlobTier;
Expand Down
9 changes: 8 additions & 1 deletion Lib/WindowsRuntime/Blob/Protocol/BlobHttpResponseParsers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,18 @@ public static BlobProperties GetProperties(HttpResponseMessage response)
}
}

if (properties.PremiumPageBlobTier.HasValue && !properties.BlobTierInferred.HasValue)
if ((properties.PremiumPageBlobTier.HasValue || properties.StandardBlobTier.HasValue) && !properties.BlobTierInferred.HasValue)
{
properties.BlobTierInferred = false;
}

// Get the time the tier of the blob was last modified
string accessTierChangeTimeString = response.Headers.GetHeaderSingleValueOrDefault(Constants.HeaderConstants.AccessTierChangeTimeHeader);
if (!string.IsNullOrEmpty(accessTierChangeTimeString))
{
properties.BlobTierLastModifiedTime = DateTimeOffset.Parse(accessTierChangeTimeString, CultureInfo.InvariantCulture);
}

return properties;
}

Expand Down
4 changes: 2 additions & 2 deletions Lib/WindowsRuntime/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("8.5.0.0")]
[assembly: AssemblyFileVersion("8.5.0.0")]
[assembly: AssemblyVersion("8.6.0.0")]
[assembly: AssemblyFileVersion("8.6.0.0")]

[assembly: ComVisible(false)]

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Microsoft Azure Storage SDK for .NET (8.5.0)
# Microsoft Azure Storage SDK for .NET (8.6.0)

The Microsoft Azure Storage SDK for .NET allows you to build Azure applications
that take advantage of scalable cloud computing resources.
Expand Down
4 changes: 2 additions & 2 deletions Test/AspNet/Microsoft.WindowsAzure.Storage.Test/project.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"version": "8.1.2.0",
"version": "8.6.0.0",
"testRunner": "xunit",

"dependencies": {
"xunit": "2.1.0",
"dotnet-test-xunit": "2.2.0-preview2-build1029",
"Microsoft.WindowsAzure.Storage": "8.1.2.0",
"Microsoft.WindowsAzure.Storage": "8.6.0.0",
"XUnitForMsTest": "1.0.0-*"
},

Expand Down
Loading

0 comments on commit bdeb107

Please sign in to comment.