Browse Source

Unique-ify extension types to not be ambiguous.

- Also updated test class names to reflect new extension naming.

#148
N. Taylor Mullen 9 years ago
parent
commit
cc9873ae6c

+ 1 - 1
src/Microsoft.AspNetCore.DataProtection.Abstractions/DataProtectionExtensions.cs → src/Microsoft.AspNetCore.DataProtection.Abstractions/DataProtectionCommonExtensions.cs

@@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.DataProtection
     /// <summary>
     /// Helpful extension methods for data protection APIs.
     /// </summary>
-    public static class DataProtectionExtensions
+    public static class DataProtectionCommonExtensions
     {
         /// <summary>
         /// Creates an <see cref="IDataProtector"/> given a list of purposes.

+ 1 - 1
src/Microsoft.AspNetCore.DataProtection.Extensions/DataProtectionExtensions.cs → src/Microsoft.AspNetCore.DataProtection.Extensions/DataProtectionAdvancedExtensions.cs

@@ -5,7 +5,7 @@ using System;
 
 namespace Microsoft.AspNetCore.DataProtection
 {
-    public static class DataProtectionExtensions
+    public static class DataProtectionAdvancedExtensions
     {
         /// <summary>
         /// Cryptographically protects a piece of plaintext data, expiring the data after

+ 1 - 1
src/Microsoft.AspNetCore.DataProtection/DataProtectionExtensions.cs → src/Microsoft.AspNetCore.DataProtection/DataProtectionUtilityExtensions.cs

@@ -9,7 +9,7 @@ using Microsoft.Extensions.DependencyInjection;
 
 namespace Microsoft.AspNetCore.DataProtection
 {
-    public static class DataProtectionExtensions
+    public static class DataProtectionUtilityExtensions
     {
         /// <summary>
         /// Returns a unique identifier for this application.

+ 2 - 2
test/Microsoft.AspNetCore.DataProtection.Abstractions.Test/DataProtectionExtensionsTests.cs → test/Microsoft.AspNetCore.DataProtection.Abstractions.Test/DataProtectionCommonExtensionsTests.cs

@@ -12,7 +12,7 @@ using Xunit;
 
 namespace Microsoft.AspNetCore.DataProtection
 {
-    public class DataProtectionExtensionsTests
+    public class DataProtectionCommonExtensionsTests
     {
         [Theory]
         [InlineData(new object[] { new string[0] })]
@@ -304,7 +304,7 @@ namespace Microsoft.AspNetCore.DataProtection
             mockProtector.Setup(p => p.Unprotect(new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05 })).Returns(new byte[] { 0x48, 0x65, 0x6c, 0x6c, 0x6f });
 
             // Act
-            string retVal = DataProtectionExtensions.Unprotect(mockProtector.Object, "AQIDBAU");
+            string retVal = DataProtectionCommonExtensions.Unprotect(mockProtector.Object, "AQIDBAU");
 
             // Assert
             Assert.Equal("Hello", retVal);

+ 1 - 1
test/Microsoft.AspNetCore.DataProtection.Extensions.Test/DataProtectionExtensionsTests.cs → test/Microsoft.AspNetCore.DataProtection.Extensions.Test/DataProtectionAdvancedExtensionsTests.cs

@@ -9,7 +9,7 @@ using Xunit;
 
 namespace Microsoft.AspNetCore.DataProtection
 {
-    public class DataProtectionExtensionsTests
+    public class DataProtectionAdvancedExtensionsTests
     {
         private const string SampleEncodedString = "AQI"; // = WebEncoders.Base64UrlEncode({ 0x01, 0x02 })
 

+ 1 - 1
test/Microsoft.AspNetCore.DataProtection.Test/DataProtectionExtensionsTests.cs → test/Microsoft.AspNetCore.DataProtection.Test/DataProtectionUtilityExtensionsTests.cs

@@ -9,7 +9,7 @@ using Xunit;
 
 namespace Microsoft.AspNetCore.DataProtection
 {
-    public class DataProtectionExtensionsTests
+    public class DataProtectionUtilityExtensionsTests
     {
         [Theory]
         [InlineData(" discriminator", "app-path ", "discriminator")] // normalized trim