Upgrade korebuild to net5.0 (#170)
This commit is contained in:
Родитель
012c3a8762
Коммит
d015ce33e9
|
@ -8,10 +8,9 @@
|
|||
<Authors>Microsoft</Authors>
|
||||
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
|
||||
<Owners>microsoft,azure-sdk</Owners>
|
||||
<PackageLicenseUrl>https://raw.githubusercontent.com/Azure/azure-functions-signalrservice-extension/dev/LICENSE</PackageLicenseUrl>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||
<PackageProjectUrl>https://github.com/Azure/azure-functions-signalrservice-extension</PackageProjectUrl>
|
||||
<PackageIconUrl>http://go.microsoft.com/fwlink/?LinkID=288890</PackageIconUrl>
|
||||
<RepositoryUrl>https://github.com/Azure/azure-functions-signalrservice-extension</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot>
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 832 B |
|
@ -1,2 +1,2 @@
|
|||
version:2.1.0-rtm-15783
|
||||
commithash:5fc2b2f607f542a2ffde11c19825e786fc1a3774
|
||||
version:3.0.0-build-20190611.1
|
||||
commithash:803fd176f1ae147aa8af08e49e76ffda7221a4cd
|
||||
|
|
5
run.ps1
5
run.ps1
|
@ -122,6 +122,11 @@ function Get-KoreBuild {
|
|||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
[System.IO.Compression.ZipFile]::ExtractToDirectory($tmpfile, $korebuildPath)
|
||||
}
|
||||
# Hack to use Core version
|
||||
Write-Host "!!! Hack to use .NET Core SDK 5.0.103"
|
||||
$sdkversion = Get-ChildItem -Path $korebuildPath -Include sdk.version -Recurse
|
||||
$sdkpath = Join-Path $sdkversion.DirectoryName $sdkversion.Name
|
||||
Set-Content -Path $sdkpath -Value "5.0.103" -Force
|
||||
}
|
||||
catch {
|
||||
Remove-Item -Recurse -Force $korebuildPath -ErrorAction Ignore
|
||||
|
|
4
run.sh
4
run.sh
|
@ -81,6 +81,10 @@ get_korebuild() {
|
|||
fi
|
||||
rm "$tmpfile" || true
|
||||
fi
|
||||
|
||||
echo "!!! Hack to use .NET Core SDK 5.0.103"
|
||||
local filePath=`find $korebuild_path -name sdk.version`
|
||||
echo "5.0.103" > $filePath
|
||||
|
||||
source "$korebuild_path/KoreBuild.sh"
|
||||
} || {
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<PackageId>Microsoft.Azure.WebJobs.Extensions.SignalRService</PackageId>
|
||||
<PackageIcon>icon.png</PackageIcon>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -15,5 +16,9 @@
|
|||
<ItemGroup>
|
||||
<ProjectReference Include="..\Microsoft.Azure.SignalR.Serverless.Protocols\Microsoft.Azure.SignalR.Serverless.Protocols.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="..\..\images\icon.png" Pack="true" PackagePath=""/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -5,7 +5,6 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Http.Internal;
|
||||
using Microsoft.Azure.WebJobs.Extensions.SignalRService;
|
||||
using Microsoft.Extensions.Primitives;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
|
@ -40,7 +39,7 @@ namespace SignalRServiceExtension.Tests
|
|||
public void ValidateSecurityTokenFacts(string tokenString, SecurityTokenStatus expectedStatus)
|
||||
{
|
||||
var ctx = new DefaultHttpContext();
|
||||
var req = new DefaultHttpRequest(ctx);
|
||||
var req = ctx.Request;
|
||||
req.Headers.Add("Authorization", new StringValues(tokenString));
|
||||
|
||||
var issuerToken = "bXlmdW5jdGlvbmF1dGh0ZXN0"; // base64 encoded for "myfunctionauthtest";
|
||||
|
|
|
@ -8,7 +8,7 @@ using System.Linq;
|
|||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Azure.SignalR.Common;
|
||||
using Microsoft.Azure.SignalR.Common;
|
||||
using Microsoft.Azure.WebJobs;
|
||||
using Microsoft.Azure.WebJobs.Extensions.SignalRService;
|
||||
using Microsoft.Azure.WebJobs.Host;
|
||||
|
@ -163,7 +163,7 @@ namespace SignalRServiceExtension.Tests
|
|||
public static IEnumerable<object[]> GenerateTestData(Type[] classType, Dictionary<string, string>[] configDicts)
|
||||
{
|
||||
if (classType.Length != configDicts.Length)
|
||||
{
|
||||
{
|
||||
throw new ArgumentException($"Length of {nameof(classType)} and {nameof(configDicts)} are not the same.");
|
||||
}
|
||||
for (var i = 0; i < classType.Length; i++)
|
||||
|
@ -204,11 +204,11 @@ namespace SignalRServiceExtension.Tests
|
|||
{
|
||||
// ignore, since we don't really connect to Azure SignalR Service
|
||||
}
|
||||
catch (Exception e)
|
||||
catch
|
||||
{
|
||||
throw e;
|
||||
}
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
private Task CreateTestTask(Type classType, Dictionary<string, string> configuration)
|
||||
{
|
||||
|
@ -218,6 +218,7 @@ namespace SignalRServiceExtension.Tests
|
|||
}
|
||||
|
||||
#region SignalRAttributeTests
|
||||
|
||||
public class SignalRFunctionsWithCustomizedKey
|
||||
{
|
||||
public async Task Func([SignalR(HubName = DefaultHubName, ConnectionStringSetting = AttrConnStrConfigKey)] IAsyncCollector<SignalRMessage> signalRMessages)
|
||||
|
@ -250,9 +251,11 @@ namespace SignalRServiceExtension.Tests
|
|||
Assert.NotNull(((ServiceManagerStore)StaticServiceHubContextStore.ServiceManagerStore).GetByConfigurationKey(AttrConnStrConfigKey));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion SignalRAttributeTests
|
||||
|
||||
#region SignalRConnectionInfoAttributeTests
|
||||
|
||||
public class SignalRConnectionInfoFunctionsWithCustomizedKey
|
||||
{
|
||||
public void Func([SignalRConnectionInfo(UserId = DefaultUserId, HubName = DefaultHubName, ConnectionStringSetting = AttrConnStrConfigKey)] SignalRConnectionInfo connectionInfo)
|
||||
|
@ -281,6 +284,7 @@ namespace SignalRServiceExtension.Tests
|
|||
UpdateFunctionOutConnectionString(connectionInfo, AttrConnStrConfigKey);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion SignalRConnectionInfoAttributeTests
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -93,7 +93,7 @@ namespace SignalRServiceExtension.Tests.Utils
|
|||
|
||||
// This allows us to pass the message through APIs defined in legacy code and then
|
||||
// operate on the HttpContext inside.
|
||||
message.Properties[nameof(HttpContext)] = httpContext;
|
||||
message.Options.Set(new HttpRequestOptionsKey<HttpContext>(nameof(HttpContext)), httpContext);
|
||||
|
||||
message.Content = new StreamContent(httpRequest.Body);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче