New Alpha Version 0.1.0

This commit is contained in:
悠静萝莉
2021-03-11 12:45:21 +08:00
parent acf964a1fd
commit 7595277011
3 changed files with 18 additions and 19 deletions

View File

@@ -1,24 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFrameworks>netstandard2.0;net5.0;</TargetFrameworks>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance> <PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<Authors>悠静萝莉,Monodesu</Authors> <Authors>悠静萝莉;Monodesu</Authors>
<Description>This donet SDK based on go-cqhttp</Description> <Description>This donet SDK based on go-cqhttp
基于 go-cqhttp 与 OneBot 标准所实现的一个 C# 开发框架,并且本框架可以支持.NET 5/.NET Framework 4.6.1以上使用,使用.NET 5可以快捷开发一个跨平台的机器人。</Description>
<PackageLicenseFile>LICENSE</PackageLicenseFile> <PackageLicenseFile>LICENSE</PackageLicenseFile>
<RepositoryUrl>https://github.com/timi137137/AuroraNative</RepositoryUrl> <RepositoryUrl>https://github.com/timi137137/AuroraNative</RepositoryUrl>
<RepositoryType>git repo</RepositoryType> <RepositoryType>git repo</RepositoryType>
<PackageTags>SDK AuroraNative Navite mikuhl go-cqhttp</PackageTags> <PackageTags>SDK AuroraNative Navite mikuhl go-cqhttp</PackageTags>
<Copyright>悠静萝莉 Copyright©2021</Copyright> <Copyright>悠静萝莉 Copyright©2021</Copyright>
<SignAssembly>false</SignAssembly> <SignAssembly>false</SignAssembly>
<DelaySign>false</DelaySign> <DelaySign>false</DelaySign>
<EnableNETAnalyzers>true</EnableNETAnalyzers> <EnableNETAnalyzers>true</EnableNETAnalyzers>
<AssemblyVersion>0.0.1.0227</AssemblyVersion> <AssemblyVersion>0.1.0.0311</AssemblyVersion>
<FileVersion>0.0.1.0227</FileVersion> <FileVersion>0.1.0.0311</FileVersion>
<PackageIcon>Icon.png</PackageIcon> <PackageIcon>Icon.png</PackageIcon>
<EnforceCodeStyleInBuild>false</EnforceCodeStyleInBuild> <EnforceCodeStyleInBuild>false</EnforceCodeStyleInBuild>
<AssemblyName>AuroraNative</AssemblyName> <AssemblyName>AuroraNative</AssemblyName>
<RootNamespace>AuroraNative</RootNamespace> <RootNamespace>AuroraNative</RootNamespace>
<Version>0.1.0-alpha</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@@ -37,7 +41,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="12.*" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -1846,7 +1846,6 @@
<summary> <summary>
创建并连接到WebSocket服务器 创建并连接到WebSocket服务器
</summary> </summary>
<returns>连接成功返回true反而异之</returns>
</member> </member>
<member name="M:AuroraNative.WebSockets.Client.Dispose"> <member name="M:AuroraNative.WebSockets.Client.Dispose">
<summary> <summary>

View File

@@ -41,19 +41,15 @@ namespace AuroraNative.WebSockets
/// <summary> /// <summary>
/// 创建并连接到WebSocket服务器 /// 创建并连接到WebSocket服务器
/// </summary> /// </summary>
/// <returns>连接成功返回true反而异之</returns> public void Create()
public bool Create()
{ {
if (WebSocket is ClientWebSocket socket) { WebSocket = new ClientWebSocket();
Task Connect = socket.ConnectAsync(new Uri("ws://" + Host + "/"), CancellationToken.None); Task Connect = ((ClientWebSocket)WebSocket).ConnectAsync(new Uri("ws://" + Host + "/"), CancellationToken.None);
Connect.Wait(); Connect.Wait();
if (WebSocket.State == WebSocketState.Open) if (WebSocket.State == WebSocketState.Open)
{ {
Task.Run(Feedback); Task.Run(Feedback);
return true;
}
} }
return false;
} }
/// <summary> /// <summary>