修正编译警告和错误
This commit is contained in:
parent
b4482c25e8
commit
e91e20e8ea
|
@ -10,7 +10,7 @@ on:
|
|||
jobs:
|
||||
build-publish:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using NewLife.Log;
|
||||
using Stardust.Monitors;
|
||||
using Xunit;
|
||||
|
@ -9,7 +10,7 @@ namespace ClientTest;
|
|||
public class DiagnosticTests
|
||||
{
|
||||
[Fact]
|
||||
public async void TestHttp()
|
||||
public async Task TestHttp()
|
||||
{
|
||||
XTrace.WriteLine(nameof(TestHttp));
|
||||
|
||||
|
@ -29,7 +30,7 @@ public class DiagnosticTests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
public async void TestHttp2()
|
||||
public async Task TestHttp2()
|
||||
{
|
||||
XTrace.WriteLine(nameof(TestHttp2));
|
||||
|
||||
|
@ -49,7 +50,7 @@ public class DiagnosticTests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
public async void TestHttp3()
|
||||
public async Task TestHttp3()
|
||||
{
|
||||
XTrace.WriteLine(nameof(TestHttp3));
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using NewLife;
|
||||
using NewLife.Security;
|
||||
using Stardust;
|
||||
|
@ -43,7 +44,7 @@ namespace ClientTest
|
|||
[InlineData("abcd", "1234")]
|
||||
[InlineData(null, "1234")]
|
||||
[InlineData("abcd", null)]
|
||||
public async void LoginTest(String code, String secret)
|
||||
public async Task LoginTest(String code, String secret)
|
||||
{
|
||||
var client = new StarClient(Server)
|
||||
{
|
||||
|
@ -58,7 +59,7 @@ namespace ClientTest
|
|||
}
|
||||
|
||||
[Fact]
|
||||
public async void LogoutTest()
|
||||
public async Task LogoutTest()
|
||||
{
|
||||
var client = new StarClient(Server);
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using NewLife;
|
||||
using NewLife.Configuration;
|
||||
using NewLife.Http;
|
||||
|
@ -54,7 +55,7 @@ public class StarFactoryTests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
public async void CreateForService()
|
||||
public async Task CreateForService()
|
||||
{
|
||||
using var star = new StarFactory("http://127.0.0.1:6600", "test", "xxx");
|
||||
await star.Service.RegisterAsync("testService", "http://localhost:1234", "tA,tagB,ttC");
|
||||
|
@ -109,7 +110,7 @@ public class StarFactoryTests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
public async void SendNodeCommand()
|
||||
public async Task SendNodeCommand()
|
||||
{
|
||||
using var star = new StarFactory("http://127.0.0.1:6600", "StarWeb", "xxx");
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using Microsoft.AspNetCore;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.TestHost;
|
||||
using NewLife.Remoting;
|
||||
|
@ -20,7 +21,7 @@ namespace Stardust.Server.Controllers.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
public async void Token_password()
|
||||
public async Task Token_password()
|
||||
{
|
||||
var model = new TokenInModel
|
||||
{
|
||||
|
@ -39,7 +40,7 @@ namespace Stardust.Server.Controllers.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
public async void Token_refresh_token()
|
||||
public async Task Token_refresh_token()
|
||||
{
|
||||
var client = _server.CreateClient();
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ using System.Threading;
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.TestHost;
|
||||
using NewLife;
|
||||
using NewLife.Caching;
|
||||
|
@ -73,7 +74,7 @@ namespace Stardust.Server.Controllers.Tests
|
|||
XTrace.WriteLine(rs.ToJson());
|
||||
|
||||
var client = _server.CreateWebSocketClient();
|
||||
client.ConfigureRequest = q => { q.Headers.Add("Authorization", "Bearer " + rs.Token); };
|
||||
client.ConfigureRequest = q => { q.Headers.Append("Authorization", "Bearer " + rs.Token); };
|
||||
using var socket = await client.ConnectAsync(new Uri("http://localhost:6600/node/notify"), default);
|
||||
|
||||
var ms = new[] { "开灯", "关门", "吃饭" };
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace Stardust.Windows;
|
|||
public class NativeWifi
|
||||
{
|
||||
#region Win32
|
||||
|
||||
#pragma warning disable CS1591
|
||||
[DllImport("Wlanapi.dll")]
|
||||
public static extern UInt32 WlanOpenHandle(
|
||||
UInt32 dwClientVersion,
|
||||
|
@ -336,7 +336,7 @@ public class NativeWifi
|
|||
const UInt32 WLAN_AVAILABLE_NETWORK_INCLUDE_ALL_MANUAL_HIDDEN_PROFILES = 0x00000002;
|
||||
|
||||
const UInt32 ERROR_SUCCESS = 0;
|
||||
|
||||
#pragma warning restore CS1591
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue