diff --git a/README.md b/README.md index abd651a..04fdd1f 100644 --- a/README.md +++ b/README.md @@ -163,6 +163,7 @@ Make sure to choose the appropriate version of this package for the version of X | Xamarin.Forms | Xamarin.Forms.Mocks | | -------------- | ------------------- | +| 4.7.0.x | 4.7.0.x | | 4.6.0.x | 4.6.0.x | | 3.5.x-4.5.x | 3.5.0.x | | 3.0.0.x | 3.0.0.x | diff --git a/TestAssembly/TestAssembly.csproj b/TestAssembly/TestAssembly.csproj index d89f524..a9fd383 100644 --- a/TestAssembly/TestAssembly.csproj +++ b/TestAssembly/TestAssembly.csproj @@ -5,7 +5,7 @@ - + diff --git a/Xamarin.Forms.Mocks.Tests/Xamarin.Forms.Mocks.Tests.csproj b/Xamarin.Forms.Mocks.Tests/Xamarin.Forms.Mocks.Tests.csproj index 91c22a1..e4c7e31 100644 --- a/Xamarin.Forms.Mocks.Tests/Xamarin.Forms.Mocks.Tests.csproj +++ b/Xamarin.Forms.Mocks.Tests/Xamarin.Forms.Mocks.Tests.csproj @@ -5,13 +5,16 @@ false - - - + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + - \ No newline at end of file + diff --git a/Xamarin.Forms.Mocks.Xaml/Xamarin.Forms.Mocks.Xaml.csproj b/Xamarin.Forms.Mocks.Xaml/Xamarin.Forms.Mocks.Xaml.csproj index 2c7f398..e35d7df 100644 --- a/Xamarin.Forms.Mocks.Xaml/Xamarin.Forms.Mocks.Xaml.csproj +++ b/Xamarin.Forms.Mocks.Xaml/Xamarin.Forms.Mocks.Xaml.csproj @@ -4,6 +4,6 @@ Xamarin.Forms.Xaml.UnitTests - + - \ No newline at end of file + diff --git a/Xamarin.Forms.Mocks.nuspec b/Xamarin.Forms.Mocks.nuspec index d7fa3f2..0c4ccb7 100644 --- a/Xamarin.Forms.Mocks.nuspec +++ b/Xamarin.Forms.Mocks.nuspec @@ -15,7 +15,7 @@ Upgraded to netstandard2.0 Xamarin, Xamarin.Forms, Mocks, Unit Testing - + - \ No newline at end of file + diff --git a/Xamarin.Forms.Mocks/PlatformServices.cs b/Xamarin.Forms.Mocks/PlatformServices.cs index c5bbca2..7bfbe42 100644 --- a/Xamarin.Forms.Mocks/PlatformServices.cs +++ b/Xamarin.Forms.Mocks/PlatformServices.cs @@ -1,6 +1,8 @@ using System; using System.IO; using System.Reflection; +using System.Security.Cryptography; +using System.Text; using System.Threading; using System.Threading.Tasks; using Xamarin.Forms.Internals; @@ -50,6 +52,20 @@ public string GetMD5Hash(string input) throw new NotImplementedException(); } + public string GetHash(string input) + { + var stringBuilder = new StringBuilder(); + using (var hash = SHA256.Create()) + { + var enc = Encoding.UTF8; + byte[] result = hash.ComputeHash(enc.GetBytes(input)); + foreach (byte b in result) + stringBuilder.Append(b.ToString("x2")); + } + + return stringBuilder.ToString(); + } + public double GetNamedSize(NamedSize size, Type targetElementType, bool useOldSizes) { return 14; diff --git a/Xamarin.Forms.Mocks/Xamarin.Forms.Mocks.csproj b/Xamarin.Forms.Mocks/Xamarin.Forms.Mocks.csproj index 087a876..7312570 100644 --- a/Xamarin.Forms.Mocks/Xamarin.Forms.Mocks.csproj +++ b/Xamarin.Forms.Mocks/Xamarin.Forms.Mocks.csproj @@ -4,9 +4,9 @@ Xamarin.Forms.Core.UnitTests - + - \ No newline at end of file + diff --git a/build.cake b/build.cake index 342286a..31c2399 100644 --- a/build.cake +++ b/build.cake @@ -17,8 +17,8 @@ var dirs = new[] Directory("./Xamarin.Forms.Mocks.Xaml/obj") + Directory(configuration), }; string sln = "./Xamarin.Forms.Mocks.sln"; -string version = "4.6.0.1"; -string suffix = ""; +string version = "4.7.0.1"; +string suffix = "-pre"; MSBuildSettings MSBuildSettings() {