Родитель
bcbf64600a
Коммит
1d7f1e8053
|
@ -42,9 +42,17 @@
|
|||
<ProjectReference Include="..\UnitTestLauncher\UnitTestLauncher.nfproj" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
|
||||
<!-- MANUAL UPDATE HERE -->
|
||||
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" />
|
||||
<ProjectExtensions>
|
||||
<ProjectCapabilities>
|
||||
<ProjectConfigurationsDeclaredAsItems />
|
||||
</ProjectCapabilities>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
|
||||
</PropertyGroup>
|
||||
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -40,9 +40,49 @@
|
|||
<None Include="nano.runsettings" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
|
||||
<!-- MANUAL UPDATE HERE -->
|
||||
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" />
|
||||
<!-- MANUAL UPDATE HERE -->
|
||||
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" />
|
||||
<!-- MANUAL UPDATE HERE -->
|
||||
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" />
|
||||
<!-- MANUAL UPDATE HERE -->
|
||||
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" />
|
||||
<!-- MANUAL UPDATE HERE -->
|
||||
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" />
|
||||
<ProjectExtensions>
|
||||
<ProjectCapabilities>
|
||||
<ProjectConfigurationsDeclaredAsItems />
|
||||
</ProjectCapabilities>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
|
||||
</PropertyGroup>
|
||||
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
|
||||
</Target>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
|
||||
</PropertyGroup>
|
||||
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
|
||||
</Target>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
|
||||
</PropertyGroup>
|
||||
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
|
||||
</Target>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
|
||||
</PropertyGroup>
|
||||
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
|
||||
</Target>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
|
||||
</PropertyGroup>
|
||||
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -39,9 +39,17 @@
|
|||
<None Include="nano.runsettings" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
|
||||
<!-- MANUAL UPDATE HERE -->
|
||||
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" />
|
||||
<ProjectExtensions>
|
||||
<ProjectCapabilities>
|
||||
<ProjectConfigurationsDeclaredAsItems />
|
||||
</ProjectCapabilities>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
|
||||
</PropertyGroup>
|
||||
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -39,9 +39,17 @@
|
|||
<None Include="nano.runsettings" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
|
||||
<!-- MANUAL UPDATE HERE -->
|
||||
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" />
|
||||
<ProjectExtensions>
|
||||
<ProjectCapabilities>
|
||||
<ProjectConfigurationsDeclaredAsItems />
|
||||
</ProjectCapabilities>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
|
||||
</PropertyGroup>
|
||||
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -40,9 +40,17 @@
|
|||
<None Include="nano.runsettings" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
|
||||
<!-- MANUAL UPDATE HERE -->
|
||||
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" />
|
||||
<ProjectExtensions>
|
||||
<ProjectCapabilities>
|
||||
<ProjectConfigurationsDeclaredAsItems />
|
||||
</ProjectCapabilities>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
|
||||
</PropertyGroup>
|
||||
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -50,9 +50,17 @@
|
|||
<None Include="nano.runsettings" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
|
||||
<!-- MANUAL UPDATE HERE -->
|
||||
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" />
|
||||
<ProjectExtensions>
|
||||
<ProjectCapabilities>
|
||||
<ProjectConfigurationsDeclaredAsItems />
|
||||
</ProjectCapabilities>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
|
||||
</PropertyGroup>
|
||||
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -38,9 +38,17 @@
|
|||
<ProjectReference Include="..\UnitTestLauncher\UnitTestLauncher.nfproj" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
|
||||
<!-- MANUAL UPDATE HERE -->
|
||||
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" />
|
||||
<ProjectExtensions>
|
||||
<ProjectCapabilities>
|
||||
<ProjectConfigurationsDeclaredAsItems />
|
||||
</ProjectCapabilities>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
|
||||
</PropertyGroup>
|
||||
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -510,5 +510,72 @@ namespace NFUnitTestConversions
|
|||
|
||||
#endregion
|
||||
|
||||
#region Base64 conversions
|
||||
|
||||
[TestMethod]
|
||||
public void Convert_FromToBase64()
|
||||
{
|
||||
string sharedAccessKeyPlainText = "IAmALongAndNiceKeyInPlainText";
|
||||
string sharedAccessKey = "SUFtQUxvbmdBbmROaWNlS2V5SW5QbGFpblRleHQ=";
|
||||
|
||||
byte[] sharedAccessKeyAsByte = Convert.FromBase64String(sharedAccessKey);
|
||||
|
||||
char[] charArray = new char[sharedAccessKeyAsByte.Length];
|
||||
|
||||
for (int i = 0; i < sharedAccessKeyAsByte.Length; i++)
|
||||
{
|
||||
charArray[i] = (char)sharedAccessKeyAsByte[i];
|
||||
}
|
||||
|
||||
string sharedAccessKeyAsString = new(charArray);
|
||||
|
||||
Assert.Equal(sharedAccessKeyAsString, sharedAccessKeyPlainText, "Converted string as byte array is not correct.");
|
||||
|
||||
string convertedFromBase64 = Convert.ToBase64String(sharedAccessKeyAsByte);
|
||||
|
||||
Debug.WriteLine($">>{convertedFromBase64}");
|
||||
Debug.WriteLine($">>{sharedAccessKey}");
|
||||
|
||||
Assert.Equal(convertedFromBase64, sharedAccessKey, "Converted string from byte array is not correct.");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Convert_ToFromBase64()
|
||||
{
|
||||
byte[] inArray = new byte[256];
|
||||
byte[] outArray;
|
||||
int x;
|
||||
|
||||
for (x = 0; x < inArray.Length; x++)
|
||||
{
|
||||
inArray[x] = (byte)x;
|
||||
}
|
||||
|
||||
string base64EncodedString_WithLineBreaks = @"AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4
|
||||
OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3Bx
|
||||
cnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmq
|
||||
q6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj
|
||||
5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w==";
|
||||
|
||||
string base64EncodedString_WithoutLineBreaks = "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w==";
|
||||
|
||||
string base64string1 = Convert.ToBase64String(
|
||||
inArray,
|
||||
0,
|
||||
inArray.Length,
|
||||
Base64FormattingOptions.InsertLineBreaks);
|
||||
|
||||
Assert.Equal(base64string1, base64EncodedString_WithLineBreaks, "Converted Base64 string with line breaks is not correct.");
|
||||
|
||||
string base64string2 = Convert.ToBase64String(inArray);
|
||||
|
||||
Assert.Equal(base64string2, base64EncodedString_WithoutLineBreaks, "Converted Base64 string without line breaks is not correct.");
|
||||
|
||||
outArray = Convert.FromBase64String(base64string1);
|
||||
|
||||
Assert.Equal(inArray, outArray, "Convert back from Base64 encoded array is not equal");
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,9 +36,17 @@
|
|||
<ProjectReference Include="..\UnitTestLauncher\UnitTestLauncher.nfproj" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
|
||||
<!-- MANUAL UPDATE HERE -->
|
||||
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" />
|
||||
<ProjectExtensions>
|
||||
<ProjectCapabilities>
|
||||
<ProjectConfigurationsDeclaredAsItems />
|
||||
</ProjectCapabilities>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
|
||||
</PropertyGroup>
|
||||
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -36,9 +36,17 @@
|
|||
<ProjectReference Include="..\UnitTestLauncher\UnitTestLauncher.nfproj" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
|
||||
<!-- MANUAL UPDATE HERE -->
|
||||
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" />
|
||||
<ProjectExtensions>
|
||||
<ProjectCapabilities>
|
||||
<ProjectConfigurationsDeclaredAsItems />
|
||||
</ProjectCapabilities>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
|
||||
</PropertyGroup>
|
||||
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -39,9 +39,17 @@
|
|||
<None Include="nano.runsettings" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
|
||||
<!-- MANUAL UPDATE HERE -->
|
||||
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" />
|
||||
<ProjectExtensions>
|
||||
<ProjectCapabilities>
|
||||
<ProjectConfigurationsDeclaredAsItems />
|
||||
</ProjectCapabilities>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
|
||||
</PropertyGroup>
|
||||
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -36,9 +36,17 @@
|
|||
<ProjectReference Include="..\UnitTestLauncher\UnitTestLauncher.nfproj" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
|
||||
<!-- MANUAL UPDATE HERE -->
|
||||
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" />
|
||||
<ProjectExtensions>
|
||||
<ProjectCapabilities>
|
||||
<ProjectConfigurationsDeclaredAsItems />
|
||||
</ProjectCapabilities>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
|
||||
</PropertyGroup>
|
||||
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -37,9 +37,17 @@
|
|||
<ProjectReference Include="..\UnitTestLauncher\UnitTestLauncher.nfproj" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
|
||||
<!-- MANUAL UPDATE HERE -->
|
||||
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" />
|
||||
<ProjectExtensions>
|
||||
<ProjectCapabilities>
|
||||
<ProjectConfigurationsDeclaredAsItems />
|
||||
</ProjectCapabilities>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
|
||||
</PropertyGroup>
|
||||
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -46,9 +46,17 @@
|
|||
<ProjectReference Include="..\UnitTestLauncher\UnitTestLauncher.nfproj" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
|
||||
<!-- MANUAL UPDATE HERE -->
|
||||
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" />
|
||||
<ProjectExtensions>
|
||||
<ProjectCapabilities>
|
||||
<ProjectConfigurationsDeclaredAsItems />
|
||||
</ProjectCapabilities>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
|
||||
</PropertyGroup>
|
||||
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -36,9 +36,17 @@
|
|||
<ProjectReference Include="..\UnitTestLauncher\UnitTestLauncher.nfproj" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
|
||||
<!-- MANUAL UPDATE HERE -->
|
||||
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" />
|
||||
<ProjectExtensions>
|
||||
<ProjectCapabilities>
|
||||
<ProjectConfigurationsDeclaredAsItems />
|
||||
</ProjectCapabilities>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
|
||||
</PropertyGroup>
|
||||
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -36,9 +36,17 @@
|
|||
<ProjectReference Include="..\UnitTestLauncher\UnitTestLauncher.nfproj" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
|
||||
<!-- MANUAL UPDATE HERE -->
|
||||
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" />
|
||||
<ProjectExtensions>
|
||||
<ProjectCapabilities>
|
||||
<ProjectConfigurationsDeclaredAsItems />
|
||||
</ProjectCapabilities>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
|
||||
</PropertyGroup>
|
||||
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -47,9 +47,17 @@
|
|||
<ProjectReference Include="..\UnitTestLauncher\UnitTestLauncher.nfproj" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
|
||||
<!-- MANUAL UPDATE HERE -->
|
||||
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" />
|
||||
<ProjectExtensions>
|
||||
<ProjectCapabilities>
|
||||
<ProjectConfigurationsDeclaredAsItems />
|
||||
</ProjectCapabilities>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
|
||||
</PropertyGroup>
|
||||
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -45,9 +45,17 @@
|
|||
<None Include="nano.runsettings" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
|
||||
<!-- MANUAL UPDATE HERE -->
|
||||
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" />
|
||||
<ProjectExtensions>
|
||||
<ProjectCapabilities>
|
||||
<ProjectConfigurationsDeclaredAsItems />
|
||||
</ProjectCapabilities>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
|
||||
</PropertyGroup>
|
||||
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -42,9 +42,17 @@
|
|||
<ProjectReference Include="..\UnitTestLauncher\UnitTestLauncher.nfproj" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
|
||||
<!-- MANUAL UPDATE HERE -->
|
||||
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" />
|
||||
<ProjectExtensions>
|
||||
<ProjectCapabilities>
|
||||
<ProjectConfigurationsDeclaredAsItems />
|
||||
</ProjectCapabilities>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
|
||||
</PropertyGroup>
|
||||
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -37,9 +37,17 @@
|
|||
<ProjectReference Include="..\UnitTestLauncher\UnitTestLauncher.nfproj" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
|
||||
<!-- MANUAL UPDATE HERE -->
|
||||
<Import Project="..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets" Condition="Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" />
|
||||
<ProjectExtensions>
|
||||
<ProjectCapabilities>
|
||||
<ProjectConfigurationsDeclaredAsItems />
|
||||
</ProjectCapabilities>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<WarningText>Update the Import path in nfproj to the correct nanoFramework.TestFramework NuGet package folder.</WarningText>
|
||||
</PropertyGroup>
|
||||
<Warning Condition="!Exists('..\..\packages\nanoFramework.TestFramework.1.0.132\build\nanoFramework.TestFramework.targets')" Text="'$(WarningText)'" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -31,13 +31,12 @@
|
|||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="nano.runsettings" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="mscorlib, Version=1.10.4.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
|
||||
<HintPath>..\..\packages\nanoFramework.CoreLibrary.1.10.4-preview.11\lib\mscorlib.dll</HintPath>
|
||||
<Reference Include="mscorlib, Version=1.10.5.0, Culture=neutral, PublicKeyToken=c07d481e9758c731">
|
||||
<HintPath>..\..\packages\nanoFramework.CoreLibrary.1.10.5-preview.10\lib\mscorlib.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<SpecificVersion>True</SpecificVersion>
|
||||
</Reference>
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="mscorlib" publicKeyToken="c07d481e9758c731" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.10.4.0" newVersion="1.10.4.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="nanoFramework.CoreLibrary" version="1.10.4-preview.11" targetFramework="netnanoframework10" />
|
||||
<package id="nanoFramework.CoreLibrary" version="1.10.5-preview.10" targetFramework="netnanoframework10" />
|
||||
<package id="nanoFramework.TestFramework" version="1.0.132" targetFramework="netnanoframework10" developmentDependency="true" />
|
||||
</packages>
|
|
@ -34,8 +34,6 @@ jobs:
|
|||
|
||||
steps:
|
||||
|
||||
# step from template @ nf-tools repo
|
||||
|
||||
# build steps only
|
||||
- template: azure-pipelines-templates/class-lib-build-only.yml@templates
|
||||
parameters:
|
||||
|
@ -43,7 +41,7 @@ jobs:
|
|||
runUnitTests: true
|
||||
unitTestRunsettings: '$(System.DefaultWorkingDirectory)\Tests\NFUnitTest_DummyAdapter\nano.runsettings'
|
||||
|
||||
# rebuild CoreLibrary project to get the assembky checksum
|
||||
# rebuild CoreLibrary project to get the assembly checksum
|
||||
- task: MSBuild@1
|
||||
condition: and( succeeded(), eq( variables['StartReleaseCandidate'], false ) )
|
||||
displayName: Rebuild CoreLibrary
|
||||
|
@ -59,7 +57,7 @@ jobs:
|
|||
parameters:
|
||||
nugetPackageName: 'nanoFramework.CoreLibrary'
|
||||
|
||||
# rebuild CoreLibrary.NoReflection project to get the assembky checksum
|
||||
# rebuild CoreLibrary.NoReflection project to get the assembly checksum
|
||||
- task: MSBuild@1
|
||||
condition: and( succeeded(), eq( variables['StartReleaseCandidate'], false ) )
|
||||
displayName: Rebuild CoreLibrary.NoReflection
|
||||
|
|
|
@ -78,10 +78,13 @@ Global
|
|||
{BE7B95D5-087C-45F8-8197-4B438BEDFE11}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{BE7B95D5-087C-45F8-8197-4B438BEDFE11}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BE7B95D5-087C-45F8-8197-4B438BEDFE11}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{BE7B95D5-087C-45F8-8197-4B438BEDFE11}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{D1DAD305-BC77-4BDC-BCDA-ADAEF1D93455}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D1DAD305-BC77-4BDC-BCDA-ADAEF1D93455}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D1DAD305-BC77-4BDC-BCDA-ADAEF1D93455}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{D1DAD305-BC77-4BDC-BCDA-ADAEF1D93455}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D1DAD305-BC77-4BDC-BCDA-ADAEF1D93455}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D1DAD305-BC77-4BDC-BCDA-ADAEF1D93455}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{8D47514F-552C-4862-961F-0CAA315A231F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8D47514F-552C-4862-961F-0CAA315A231F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8D47514F-552C-4862-961F-0CAA315A231F}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
|
|
|
@ -13,4 +13,4 @@ using System.Reflection;
|
|||
[assembly: AssemblyProduct(".NET nanoFramework mscorlib")]
|
||||
[assembly: AssemblyCopyright("Copyright (c) .NET Foundation and Contributors")]
|
||||
|
||||
[assembly: AssemblyNativeVersion("100.5.0.10")]
|
||||
[assembly: AssemblyNativeVersion("100.5.0.11")]
|
||||
|
|
|
@ -308,16 +308,8 @@ namespace System
|
|||
/// The white-space characters, and their Unicode names and hexadecimal code points, are tab(CHARACTER TABULATION, U+0009), newline(LINE FEED, U+000A), carriage return (CARRIAGE RETURN, U+000D), and blank(SPACE, U+0020). An arbitrary number of white-space characters can appear in s because all white-space characters are ignored.
|
||||
/// The valueless character, "=", is used for trailing padding. The end of s can consist of zero, one, or two padding characters.
|
||||
/// </remarks>
|
||||
public static byte[] FromBase64String(string inString)
|
||||
{
|
||||
#pragma warning disable S3928 // Parameter names used into ArgumentException constructors should match an existing one
|
||||
if (inString == null) throw new ArgumentNullException();
|
||||
#pragma warning restore S3928 // Parameter names used into ArgumentException constructors should match an existing one
|
||||
|
||||
var chArray = inString.ToCharArray();
|
||||
|
||||
return FromBase64CharArray(chArray, 0, chArray.Length);
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
public extern static byte[] FromBase64String(string inString);
|
||||
|
||||
/// <summary>
|
||||
/// Converts a subset of a Unicode character array, which encodes binary data as base-64 digits, to an equivalent 8-bit unsigned integer array. Parameters specify the subset in the input array and the number of elements to convert.
|
||||
|
@ -341,14 +333,10 @@ namespace System
|
|||
if (offset > inArray.Length - length) throw new ArgumentOutOfRangeException();
|
||||
#pragma warning restore S3928 // Parameter names used into ArgumentException constructors should match an existing one
|
||||
|
||||
// copy to new array
|
||||
var destinationArray = new char[length];
|
||||
Array.Copy(inArray, offset, destinationArray, 0, length);
|
||||
// copy to new string
|
||||
string base64String = new(inArray, offset, length);
|
||||
|
||||
return FromBase64CharArray(destinationArray, length);
|
||||
return FromBase64String(base64String);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||
private static extern byte[] FromBase64CharArray(char[] inArray, int length);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 840c15cb599373e386324b678c9d5c9fed480744
|
||||
Subproject commit 8971e8eabf03d7d27afd7789608472b2b8ca11d2
|
Загрузка…
Ссылка в новой задаче