Skip to content

Commit

Permalink
Merge pull request #14 from JadynWong/develop
Browse files Browse the repository at this point in the history
优化内存占用
使用数组提高查询速度
make appveyor suppprt c# 7.2
  • Loading branch information
JadynWong authored Apr 16, 2019
2 parents 69c5d88 + add14c3 commit 10bffdf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions QQWry/QQWry.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<Description>QQWry IP查询</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<LangVersion>7.3</LangVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
17 changes: 15 additions & 2 deletions QQWry/QQWryOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,21 @@ public QQWryOptions(string dbPath)
/// </summary>
public string DbPath
{
get => string.IsNullOrWhiteSpace(_dbPath) ? Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "qqwry.dat") : _dbPath;
set => _dbPath = value;
get
{
if (string.IsNullOrWhiteSpace(_dbPath))
{
return Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "qqwry.dat");
}
else
{
return _dbPath;
}
}
set
{
_dbPath = value;
}
}

/// <summary>
Expand Down

0 comments on commit 10bffdf

Please sign in to comment.