Skip to content

Commit

Permalink
Remove update methods
Browse files Browse the repository at this point in the history
  • Loading branch information
JadynWong committed Jun 2, 2023
1 parent 2189b72 commit 0336e18
Show file tree
Hide file tree
Showing 17 changed files with 134 additions and 823 deletions.
34 changes: 9 additions & 25 deletions QQWry.DependencyInjection/QQWry.DependencyInjection.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;netcoreapp2.0;netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;net5;</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Copyright>JadynWong</Copyright>
<PackageProjectUrl>https://github.com/JadynWong/IP_qqwry</PackageProjectUrl>
Expand All @@ -10,38 +10,22 @@
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<Description>QQWry IP查询 DependencyInjection</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.*" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.*" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.0.*" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.1.*" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.2' ">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.2.*" />
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.0' ">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.0.*" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.*" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net5' ">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.*" />
<ItemGroup>
<None Include="..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

<ItemGroup>
Expand Down
153 changes: 0 additions & 153 deletions QQWry/BinaryReaderExtensions.cs

This file was deleted.

27 changes: 6 additions & 21 deletions QQWry/IIpSearch.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Threading;
using System.Threading.Tasks;
using QQWry;

namespace QQWry
{
Expand All @@ -22,7 +21,7 @@ public interface IIpSearch
/// <param name="ip"></param>
/// <returns></returns>
bool CheckIp(string ip);

/// <summary>
/// 获取IP信息
/// </summary>
Expand All @@ -36,33 +35,19 @@ public interface IIpSearch
/// <param name="strIp"></param>
/// <param name="token"></param>
/// <returns></returns>
Task<IpLocation> GetIpLocationAsync(string strIp, CancellationToken token = default(CancellationToken));

/// <summary>
/// 获取CopyWrite
/// </summary>
/// <returns></returns>
QQWryCopyWrite GetCopyWrite();
Task<IpLocation> GetIpLocationAsync(string strIp, CancellationToken token = default);

/// <summary>
/// 获取CopyWrite
/// 初始化
/// </summary>
/// <returns></returns>
Task<QQWryCopyWrite> GetCopyWriteAsync();
bool Init();

/// <summary>
/// 获取IP信息
/// </summary>
/// <param name="getNewDb"></param>
/// <returns></returns>
bool Init(bool getNewDb = false);

/// <summary>
/// 获取IP信息
/// 初始化
/// </summary>
/// <param name="getNewDb"></param>
/// <param name="token"></param>
/// <returns></returns>
Task<bool> InitAsync(bool getNewDb = false, CancellationToken token = default(CancellationToken));
Task<bool> InitAsync(CancellationToken token = default);
}
}
6 changes: 1 addition & 5 deletions QQWry/IpLocation.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace QQWry
{
public struct IpLocation
public record struct IpLocation
{
public string Ip, Country, Area;
}
Expand Down
18 changes: 11 additions & 7 deletions QQWry/QQWry.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;netcoreapp2.0;netcoreapp2.1;netcoreapp2.2;netcoreapp3.0;netcoreapp3.1;net5;net4.5</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net6.0;net452</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">netstandard2.0</TargetFrameworks>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Copyright>JadynWong</Copyright>
Expand All @@ -11,19 +11,23 @@
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<Description>QQWry IP查询</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<LangVersion>7.3</LangVersion>
<LangVersion>latest</LangVersion>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="SharpZipLib" Version="1.3.3" />
<None Include="..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net4.5'">
<ItemGroup Condition="'$(TargetFramework)' == 'net452'">
<Reference Include="System.Net.Http" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' != 'net4.5'">
<PackageReference Include="System.Text.Encoding.CodePages" Version="5.0.0" />
<ItemGroup Condition="'$(TargetFramework)' != 'net452'">
<PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.0" />
</ItemGroup>

</Project>
18 changes: 0 additions & 18 deletions QQWry/QQWryCopywrite.cs

This file was deleted.

Loading

0 comments on commit 0336e18

Please sign in to comment.