Skip to content

Commit

Permalink
Tk (#2)
Browse files Browse the repository at this point in the history
* <chore>

* 1.0.7

* <adjust>

* <chore>

* <chore>

* <refactor>

* <doc>

* <doc>

* <feat> + Unicode,UnicodeDe

* <revert>

* <fix>

* bugfix

* <feat> 从资源文件读取Description

* <feat> 从资源文件读取Description-可继承

* <fix> 将一个对象序列化成json文本

* <chore>

* 调整一下日志格式

* feat: * 泛型特性本地化资源描述 * 添加测试项目

* <chore>

* feat: enum、string

* feat: long 类型增加rand方法

* feat: ToInvString

* fix: ToInvString

* fix: ToInvString

* fix: ParameterFormat bug

* [BLD] [SKIP CI]

* [BLD] [SKIP CI]
  • Loading branch information
nsnail authored Sep 28, 2023
1 parent de03df1 commit 8c0dbcf
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions publish.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Remove-Item ./dist -Recurse -Force -Confirm:$false
dotnet build -c Release
$apikey = Read-Host -Prompt "nuget apikey"
foreach ($file in Get-ChildItem -Path ./dist/NSExt/bin/Release | Where-Object { $_.Name -match "nupkg" }) {
dotnet nuget push $file --skip-duplicate --api-key $apikey --source https://api.nuget.org/v3/index.json
}
2 changes: 2 additions & 0 deletions src/NSExt/Attributes/LocalizationAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ public sealed class LocalizationAttribute : Attribute
/// <summary>
/// Initializes a new instance of the <see cref="LocalizationAttribute" /> class.
/// </summary>
#pragma warning disable IDE0290
public LocalizationAttribute(Type resourceClass)
#pragma warning restore IDE0290
{
ResourceClass = resourceClass;
}
Expand Down
2 changes: 2 additions & 0 deletions src/NSExt/Attributes/ResourceDescriptionAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ public sealed class ResourceDescriptionAttribute<T> : Attribute
/// <summary>
/// Initializes a new instance of the <see cref="ResourceDescriptionAttribute{T}" /> class.
/// </summary>
#pragma warning disable IDE0290
public ResourceDescriptionAttribute(string resourceName)
#pragma warning restore IDE0290
{
ResourceName = resourceName;
}
Expand Down
2 changes: 2 additions & 0 deletions src/NSExt/Extensions/StreamExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public static long FirstByteIndex(this Stream me, byte[] findBytes)
/// </summary>
public static bool IsTextStream(this Stream me)
{
#pragma warning disable IDE0300
return me.FirstByteIndex(new byte[] { 0x00, 0xff }) < 0;
#pragma warning restore IDE0300
}
}
2 changes: 1 addition & 1 deletion src/NSExt/NSExt.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="../../code.quality.props"/>
<Import Project="../../packable.props"/>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0-rc.1.23419.4"/>
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0"/>
</ItemGroup>
<ItemGroup>
<None Include="../../logo.png" Pack="true" PackagePath=""/>
Expand Down

0 comments on commit 8c0dbcf

Please sign in to comment.